[m-users.] Basic Unit Test Framework

Charles Shuller charles.shuller at gmail.com
Mon Jul 13 06:37:45 AEST 2015


>
> 1. testPred/7 to  to test a predicate that takes two input parameters and
> either succeeds or fails.
>
> It really seemed to me that a test case SHOULD be semi-deterministic, but
I promptly ran into a few problems with it:

1)  I didn't think back tracking should even be implied as a possibility
for a test case (semidet, as I understand it, will backtrack and try a
different set of args under some circumstances after a failure)

2)  I handle a small number of test dispositions, not just PASS or FAIL,
because I used to be a QA engineer and test management turns into a
nightmare if you only have pass/fail on any project of scale.  The added
dispositions include some to indicate that a test cannot be run on a
platform (or for a particular grade in mercury's case), has not been run
for whatever reason, finds a bug that isn't going to be fixed, or something
that should be broken starts working again.

3) Hard to get a message about what failed if the predicate only succeeds
of fails.  I save off results instead of pushing IO into the test harness
though.   I felt it made more sense.

Did you find any solutions to the problems I encountered, or is it just
that our solutions target two different use cases :)


Cheers!

Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20150712/88cf733f/attachment.html>


More information about the users mailing list