Jump to content

JamieMi

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Thank you everyone. I have got the negative/positive testing under control using DUnitX with your help. I have been searching all over for a good reference to DUnitX so I can use it more efficiently. Most of the stuff I have found use the same lame examples that do an add, subtract, etc. Can anyone point me to a solid reference book or site for using this tool? Thank you in advance. jamie
  2. I have been a tester and automator for the last 30 years. It looks like DUnitX is fine for positive testing, but somewhat less for negative testing. If I build a unit that is going to do mathematic calculations, I can come up with lots of tests that I would run manually, including passing in NULL for each term, passing in chars, passing in too large numbers, passing in objects, passing in Booleans, etc. Is DUnitX designed for only positive testing? Historically, this is where I tend to find lots of bugs...
  3. Windows 11 Pro. Rad 12. DUnitX tests. Trying to recreate example where I build easy math unit and trying to unit test the tests. ---------------------- Example --------------------------- [TestCase('Test 1', '')] [TestCase('Test 2', '-1,-5,-6')] [TestCase('Test 3', '6,-4,2')] procedure TestAdd(Value1, Value2, _Result: Int64); ------------------------------------ If I use int64 values all is good. Trying to test bad values (i.e. non-int64 values) fail. TestCase 1, for example, actually passes in NULL, but when it runs the test passes. Likewise, if I use non-int64 values, it passes every time. The following all pass. [TestCase('TestX', '')] [TestCase('TestX', 'A,B,C')] [TestCase('TestX', '"A", "B", "C"')] [TestCase('TestX', 'X,Y')] It looks like the DUnitX is massaging the arguments Value1, and Value2 to make them 0 if they are illegal. I expected to see an exception when the test is run. Any ideas what is going on?
×