-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testcase Syntax #19
Comments
Most tests seem to be described with the addition of these two functions
|
The tests in MeTTamorph directly run both MeTTa interpreter and MeTTamorph on the same test files each and check whether the output matches, this is the reason why such assertions are unnecessary. Producing the same output is the implicit assertion which is reported when it fails. |
Yes, I agree that comparing results from compiled and not compiled versions is a good approach for this project, but it may turn out to be the case that something in addition is needed. Some MeTTa code cannot be supported by the compiler and running compiled functions from such the code should also be checked. Thus, I suppose that more tests will be added, which will not be completely compiled. It will still be possible to compare partly-compiled and not compiled versions, but writing such tests may appear not too convenient. Let's try and see how it goes. |
Why i was suggesting it is that most all tests in hyperon-experimental https://github.com/trueagi-io/hyperon-experimental/tree/main/python/tests/scripts use |
If we'd like to run all the unit tests from the main repo with the use of compilation by metta-morph, this would make perfect sense. Well, it also makes sense to be able to run these tests manually to check the results under metta-morph. Thus, I agree that it makes sense to introduce asserts for this sake, although it doesn't imply that unit tests in metta-morph itself should necessarily use them. |
Good point, we can add these assert functions at least. A portable version (TODO):
|
Going to suggest for testcases (since this works in Rust MeTTa) we adopt a standard test writing format
The text was updated successfully, but these errors were encountered: