[ nice-Bugs-1096734 ] assert doesn't print useful info. Lines wrong.
"SourceForge.net" <[email protected]> Wed, 05 Jan 2005 13:12:52 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1096734, was opened at 2005-01-05 16:12 Message generated for change (Tracker Item Submitted) made by Item Submitter 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. ---------------------------------------------------------------------- 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