You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a first version of the testing framework discussed at HHH2024.Q3.
Add testing pragmas which specify that a function is a test and how the test should be executed. For now, let's have three possibilities.
test: eval indicates that the zero-argument boolean property function should be evaluated with the Core evaluator and the result compared with true.
Example:
The command juvix test would collect all tests declared in all modules in the project and run them according to the test pragmas. It would take care under the hood of all details like setting the random seed and using juvix-quickcheck correctly.
The text was updated successfully, but these errors were encountered:
I think we should replace (if possible) the pragmas by Juvix code. Even if the available options in this proposal are minimal, they are bound to grow. So we should take advantage of all the Juvix facilities that we have already implemented, such as default arguments, go to definition, documentation on mouse over, etc.
Add a first version of the testing framework discussed at HHH2024.Q3.
Add testing pragmas which specify that a function is a test and how the test should be executed. For now, let's have three possibilities.
test: eval
indicates that the zero-argument boolean property function should be evaluated with the Core evaluator and the result compared withtrue
.Example:
test-cases: ident
indicates that the property function should be tested for the argument values specified by Juvix identifierident
.Example:
test: rand
specifies that thejuvix-quickcheck
library should be used to generate random test casesExample:
The command
juvix test
would collect all tests declared in all modules in the project and run them according to the test pragmas. It would take care under the hood of all details like setting the random seed and usingjuvix-quickcheck
correctly.The text was updated successfully, but these errors were encountered: