[Issue 4653] More unit test functions should be added - like assertEqual() and assertNotEqual()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 28 17:20:16 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4653


Jonathan M Davis <jmdavisProg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #723 is|0                           |1
           obsolete|                            |


--- Comment #6 from Jonathan M Davis <jmdavisProg at gmail.com> 2010-08-28 17:20:03 PDT ---
Created an attachment (id=742)
Some useful unit testing functions.

I've been using these functions heavily in my unit tests, and have them to be
_very_ useful. However, I found that using <> to enclose the toString() result
of the object in an error message causes confusion with opCmp. e.g.

assertOpCmp!("==")() failed: <1> < <2>


is too hard to read. So, I've changed it to use []. e.g.

assertOpCmp!("==")() failed: [1] < [2]


So, I'm posting the updated code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list