[m-users.] Basic Unit Test Framework
Dirk Ziegemeyer
dirk at ziegemeyer.de
Mon Jul 13 05:59:48 AEST 2015
Hello Charles,
> Am 11.07.2015 um 23:16 schrieb Charles Shuller <charles.shuller at gmail.com>:
>
> I started on a unit test framework, and would very much appreciate a code review of any level of formality:
>
> https://bitbucket.org/charles_shuller/mercury_unit/overview
>
> You can see how tests are written and executed in the tests directory.
Can I use your unit test framework to test predicates with an arbitrary number of arguments and modes?
In my own little unit test module (attached), I use different test predicates for this purpose because I didn’t find another solution yet.
E.g.
1. testPred/7 to to test a predicate that takes two input parameters and either succeeds or fails.
2. testPredio/6 to test a predicate that takes one input parameter and returns one output parameter.
3. testPrediio/7 to test a predicate that takes two input parameters and returns one output parameter.
4. testDCG/6 to test a DCG parser predicate that returns a parsing result
Best regards,
Dirk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testUtils.m
Type: application/octet-stream
Size: 2766 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20150712/2a6be247/attachment.obj>
More information about the users
mailing list