[Issue 4653] More unit test functions should be added - like assertEqual() and assertNotEqual()
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 17 23:08:52 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4653
--- Comment #5 from Jonathan M Davis <jmdavisProg at gmail.com> 2010-08-17 23:08:49 PDT ---
Created an attachment (id=723)
Some useful unit testing functions.
Okay. I'm attaching some functions that I've already done which seem quite
useful - namely assertEqual(), assertNotEqual(), and assertOpCmp(). The first
two should be obvious, but assertOpCmp() takes a template parameter of "==",
"<", or ">" and tests that operation using opCmp(). The resulting assertion on
failure not only prints out the two values that you gave it to test, but it
also prints out whether the first was actually ==, <, or > the second. The
attached file also includes assertExcThrown() and assertExcNotThrown() from
http://d.puremagic.com/issues/show_bug.cgi?id=4644 , since I used them in the
unit tests for assertEqual(), assertNotEqual(), and assertOpCmp().
--
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