[ nice-Bugs-1096734 ] assert doesn't print useful info. Lines wrong.
"SourceForge.net" <[email protected]> Wed, 05 Jan 2005 14:24:14 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1096734, was opened at 2005-01-05 22:12 Message generated for change (Comment added) made by arjanb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1096734&group_id=12788 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: mike.beckerle (mbeckerle) Assigned to: Nobody/Anonymous (nobody) Summary: assert doesn't print useful info. Lines wrong. Initial Comment: Version 0.9.10 I am using lots of assertions and the unit testing system. My assertions don't give enough information: e.g., Test failed: nice.lang.AssertionFailed Location: fun.nice method _test_reader line 202 1) The line number is fictitious. It's not at line 202 of any file of mine. 2) The "assertion failed" message ought to repeat the text of the assertion so you can see what failed. This eliminates the desire to use the assert message text to redundantly restate the predicate. That is, you shouldn't write messages like: assert (foo < 5): "foo not less than 5"; Instead if you write: assert (foo < 5); the system shoudl print nice.lang.AssertionFailed "(foo < 5)" and then give a line number in a real file. ---------------------------------------------------------------------- >Comment By: Arjan Boeijink (arjanb) Date: 2005-01-05 23:24 Message: Logged In: YES user_id=688815 1) Right, reporting of line numbers need improvement especially in nicec generated classes like 'fun' and 'dispatch'. 2) That's a good idea. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1096734&group_id=12788 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt