From noreply at rubyforge.org Fri May 7 14:45:13 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 7 May 2010 14:45:13 -0400 (EDT) Subject: [test-unit-tracker] [ test-unit-Feature Requests-28181 ] Failure message for assert_in_delta not clear Message-ID: <20100507184513.9EBBC1858300@rubyforge.org> Feature Requests item #28181, was opened at 2010-05-07 18:45 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28181&group_id=5650 Category: None Group: None Status: Open Priority: 3 Submitted By: David MARCHALAND (marchaland) Assigned to: Nobody (None) Summary: Failure message for assert_in_delta not clear Initial Comment: failure message OK: -------------------- #Failure while checking 'logic' field. # <1> expected but was # <0>. failure message not OK: ------------------------ # Failure while checking 'real' field. # <32000.0> and # <0.0> expected to be within # <100> of each other. Assert_in_delta function should have a failure message like : # Failure while checking 'real' field. # <32000.0> expected but was # <0.0> (tolerance <100>). ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28181&group_id=5650 From noreply at rubyforge.org Sun May 9 00:45:06 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 9 May 2010 00:45:06 -0400 (EDT) Subject: [test-unit-tracker] [ test-unit-Feature Requests-28181 ] Failure message for assert_in_delta not clear Message-ID: <20100509044506.DEE6A1858322@rubyforge.org> Feature Requests item #28181, was opened at 2010-05-08 03:45 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28181&group_id=5650 Category: None Group: None Status: Open Priority: 3 Submitted By: David MARCHALAND (marchaland) Assigned to: Nobody (None) Summary: Failure message for assert_in_delta not clear Initial Comment: failure message OK: -------------------- #Failure while checking 'logic' field. # <1> expected but was # <0>. failure message not OK: ------------------------ # Failure while checking 'real' field. # <32000.0> and # <0.0> expected to be within # <100> of each other. Assert_in_delta function should have a failure message like : # Failure while checking 'real' field. # <32000.0> expected but was # <0.0> (tolerance <100>). ---------------------------------------------------------------------- >Comment By: Kouhei Sutou (kou) Date: 2010-05-09 13:45 Message: What about this? <<0.0>-<100>(-100.0) <= <32000.0> <= <0.0>+<100>(100.0)> expected but was <<0.0>-<100>(-100.0) <= <0.0>+<100>(100.0) <= <32000.0>>. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28181&group_id=5650 From noreply at rubyforge.org Sun May 9 01:34:17 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 9 May 2010 01:34:17 -0400 (EDT) Subject: [test-unit-tracker] [ test-unit-Feature Requests-28006 ] Multiple startup Message-ID: <20100509053417.10C081858324@rubyforge.org> Feature Requests item #28006, was opened at 2010-03-26 06:25 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28006&group_id=5650 Category: None Group: None Status: Open Priority: 3 Submitted By: David MARCHALAND (marchaland) Assigned to: Nobody (None) Summary: Multiple startup Initial Comment: Hi, I would like to define multiple startups in the same testcase (similar approach compared to setup) : def self.startup # Do some stuff end self.startup def self.my_startup # Do some stuff end Is there already a way to do that ? Thanks, David ---------------------------------------------------------------------- >Comment By: Kouhei Sutou (kou) Date: 2010-05-09 14:34 Message: No. There is no way for that. That is difficult because we can't use method_added hook for class method... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28006&group_id=5650 From noreply at rubyforge.org Sun May 9 04:16:33 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 9 May 2010 04:16:33 -0400 (EDT) Subject: [test-unit-tracker] [ test-unit-Feature Requests-28181 ] Failure message for assert_in_delta not clear Message-ID: <20100509081633.DD7F3185831F@rubyforge.org> Feature Requests item #28181, was opened at 2010-05-07 18:45 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28181&group_id=5650 Category: None Group: None Status: Open Priority: 3 Submitted By: David MARCHALAND (marchaland) Assigned to: Nobody (None) Summary: Failure message for assert_in_delta not clear Initial Comment: failure message OK: -------------------- #Failure while checking 'logic' field. # <1> expected but was # <0>. failure message not OK: ------------------------ # Failure while checking 'real' field. # <32000.0> and # <0.0> expected to be within # <100> of each other. Assert_in_delta function should have a failure message like : # Failure while checking 'real' field. # <32000.0> expected but was # <0.0> (tolerance <100>). ---------------------------------------------------------------------- >Comment By: David MARCHALAND (marchaland) Date: 2010-05-09 08:16 Message: If I go further with your solution, it should only be : <<32000.0>-<100>(31900.0) <= <0.0> <= <32000.0>+<100>(32100.0)>. Your current implementation is more compact, hence simpler for debug. One missing thing is to explicit what are the "measured" value and the "expected" values. That was the gist of my proposal. ---------------------------------------------------------------------- Comment By: Kouhei Sutou (kou) Date: 2010-05-09 04:45 Message: What about this? <<0.0>-<100>(-100.0) <= <32000.0> <= <0.0>+<100>(100.0)> expected but was <<0.0>-<100>(-100.0) <= <0.0>+<100>(100.0) <= <32000.0>>. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28181&group_id=5650 From noreply at rubyforge.org Sun May 9 04:22:18 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 9 May 2010 04:22:18 -0400 (EDT) Subject: [test-unit-tracker] [ test-unit-Feature Requests-28006 ] Multiple startup Message-ID: <20100509082218.B5DA71858329@rubyforge.org> Feature Requests item #28006, was opened at 2010-03-25 21:25 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28006&group_id=5650 Category: None Group: None Status: Open Priority: 3 Submitted By: David MARCHALAND (marchaland) Assigned to: Nobody (None) Summary: Multiple startup Initial Comment: Hi, I would like to define multiple startups in the same testcase (similar approach compared to setup) : def self.startup # Do some stuff end self.startup def self.my_startup # Do some stuff end Is there already a way to do that ? Thanks, David ---------------------------------------------------------------------- >Comment By: David MARCHALAND (marchaland) Date: 2010-05-09 08:22 Message: Can we imagine a mechanism similar to "test_*" methods? All class methods starting with "startup_*" and current "startup" will be executed before any test. Same proposal for "shutdown". For info, my issue is the following. I need to add a common startup for each testcase and someone else that defines testcases can also add a startup. Hence, I need to execute both startups. Any other idea to do that ? ---------------------------------------------------------------------- Comment By: Kouhei Sutou (kou) Date: 2010-05-09 05:34 Message: No. There is no way for that. That is difficult because we can't use method_added hook for class method... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28006&group_id=5650 From noreply at rubyforge.org Sat May 15 22:12:54 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 15 May 2010 22:12:54 -0400 (EDT) Subject: [test-unit-tracker] [ test-unit-Feature Requests-28006 ] Multiple startup Message-ID: <20100516021254.37A391858319@rubyforge.org> Feature Requests item #28006, was opened at 2010-03-26 06:25 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28006&group_id=5650 Category: None Group: None Status: Open Priority: 3 Submitted By: David MARCHALAND (marchaland) Assigned to: Nobody (None) Summary: Multiple startup Initial Comment: Hi, I would like to define multiple startups in the same testcase (similar approach compared to setup) : def self.startup # Do some stuff end self.startup def self.my_startup # Do some stuff end Is there already a way to do that ? Thanks, David ---------------------------------------------------------------------- >Comment By: Kouhei Sutou (kou) Date: 2010-05-16 11:12 Message: Uhm... If we use "test_*" methods mechanism, we can't control "startup_*" methods order (or are difficult to provide intuitive API). What about 'super'? class A class << self def startup p [:startup, :A] end end end class B < A class << self def startup p [:startup, :B] super end end end A.startup # => [:startup, :A] B.startup # => [:startup, :B] # => [:startup, :A] ---------------------------------------------------------------------- Comment By: David MARCHALAND (marchaland) Date: 2010-05-09 17:22 Message: Can we imagine a mechanism similar to "test_*" methods? All class methods starting with "startup_*" and current "startup" will be executed before any test. Same proposal for "shutdown". For info, my issue is the following. I need to add a common startup for each testcase and someone else that defines testcases can also add a startup. Hence, I need to execute both startups. Any other idea to do that ? ---------------------------------------------------------------------- Comment By: Kouhei Sutou (kou) Date: 2010-05-09 14:34 Message: No. There is no way for that. That is difficult because we can't use method_added hook for class method... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28006&group_id=5650 From noreply at rubyforge.org Sat May 15 22:46:17 2010 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 15 May 2010 22:46:17 -0400 (EDT) Subject: [test-unit-tracker] [ test-unit-Feature Requests-28181 ] Failure message for assert_in_delta not clear Message-ID: <20100516024617.C3F7D1858324@rubyforge.org> Feature Requests item #28181, was opened at 2010-05-08 03:45 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28181&group_id=5650 Category: None Group: None >Status: Closed Priority: 3 Submitted By: David MARCHALAND (marchaland) Assigned to: Nobody (None) Summary: Failure message for assert_in_delta not clear Initial Comment: failure message OK: -------------------- #Failure while checking 'logic' field. # <1> expected but was # <0>. failure message not OK: ------------------------ # Failure while checking 'real' field. # <32000.0> and # <0.0> expected to be within # <100> of each other. Assert_in_delta function should have a failure message like : # Failure while checking 'real' field. # <32000.0> expected but was # <0.0> (tolerance <100>). ---------------------------------------------------------------------- >Comment By: Kouhei Sutou (kou) Date: 2010-05-16 11:46 Message: OK. I've changed message. Thanks for your suggestion. Assertion: assert_in_delta(0.5, 0.4, 0.05, "message") Message: message. <0.5> expected but was <0.4> (tolerance <0.05>). Relation: <<0.4> < <0.5>-<0.05>(0.45) <= <0.5>+<0.05>(0.55)> ---------------------------------------------------------------------- Comment By: David MARCHALAND (marchaland) Date: 2010-05-09 17:16 Message: If I go further with your solution, it should only be : <<32000.0>-<100>(31900.0) <= <0.0> <= <32000.0>+<100>(32100.0)>. Your current implementation is more compact, hence simpler for debug. One missing thing is to explicit what are the "measured" value and the "expected" values. That was the gist of my proposal. ---------------------------------------------------------------------- Comment By: Kouhei Sutou (kou) Date: 2010-05-09 13:45 Message: What about this? <<0.0>-<100>(-100.0) <= <32000.0> <= <0.0>+<100>(100.0)> expected but was <<0.0>-<100>(-100.0) <= <0.0>+<100>(100.0) <= <32000.0>>. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21859&aid=28181&group_id=5650