-
Notifications
You must be signed in to change notification settings - Fork 9
Description
For writing unit tests I am aware of at least 2 different approaches:
(declare-const test1 (eo::requires left_hand_side_of_test1 right_hand_side_of_test1 whatever_return_value1))
...
(declare-const testn (eo::requires left_hand_side_of_testn right_hand_side_of_testn whatever_return_valuen))
and
(declare-rule test ()
:requires ((left_hand_side_of_test1 right_hand_side_of_test1)
...
(left_hand_side_of_testn right_hand_side_of_testn))
:conclusion whatever_value)
(step test_step whatever_value :rule test)
The first approach requires for you to provide a name for each test, and to indicate some artificial return value. The second approach allows you to define a bunch of related tests faster (you just define left hand-side and right hand-side of each test), grouped together under the same name. But you also need to add some artificial step command, just to trigger testing. In both approaches, we are also including extra information that is not directly related with the tests.
Would it be possible to add direct support for unit-testing into Eunoia?, such that we are not required to find ways to codify them in terms of other concepts, which forces us to include extra information not directly related with testing.