Adds a test generation framework #5

Closed
jbwdevries wants to merge 0 commits from test-generator-framework into master
Owner

Prior to this PR, each type would have its own test handwritten suite. The end result was that not all types were tested for all situations.

This PR adds a framework based on a Markdown file, which generates the basic tests for the types defined in json files. These are auto generated and updated by the Makefile before the test suite is run.

Also, the test helpers can now properly import and export typed variables such as bytes, static arrays and tuples.

Also, adds better support for i8 type.

Also, started on a runtime.py, since there's quite some code now that deals with compile time handling of WebAssembly stuff.

Also, minor improvement to the typing system. Better match for 'tuple' literals with static array types.

Also, reduced spam when printing the type analysis results; constraints that go back on the backlog are now no longer printed one by one. It now also prints the end results of the typing analysis.

Prior to this PR, each type would have its own test handwritten suite. The end result was that not all types were tested for all situations. This PR adds a framework based on a Markdown file, which generates the basic tests for the types defined in json files. These are auto generated and updated by the Makefile before the test suite is run. Also, the test helpers can now properly import and export typed variables such as bytes, static arrays and tuples. Also, adds better support for `i8` type. Also, started on a runtime.py, since there's quite some code now that deals with compile time handling of WebAssembly stuff. Also, minor improvement to the typing system. Better match for 'tuple' literals with static array types. Also, reduced spam when printing the type analysis results; constraints that go back on the backlog are now no longer printed one by one. It now also prints the end results of the typing analysis.
jbwdevries added 5 commits 2023-11-14 12:48:19 +00:00
Also, reduced spam on typing dump by only showing the
'back on todo list' count, rather than repeat them all.

Also, typing on tests.integration.helpers
Author
Owner

Todo:

  • +3 and -3 as valid literals
  • Generate and fix the tests for structs
  • Go over the markdown file to make use of extracting values
Todo: - ~~+3 and -3 as valid literals~~ - Generate and fix the tests for structs - Go over the markdown file to make use of extracting values
jbwdevries added 4 commits 2023-11-14 13:09:36 +00:00
jbwdevries added 1 commit 2023-11-14 14:04:25 +00:00
jbwdevries added 2 commits 2023-11-15 10:40:31 +00:00
jbwdevries added 1 commit 2023-11-15 11:00:04 +00:00
jbwdevries added 1 commit 2023-11-15 11:06:30 +00:00
jbwdevries force-pushed test-generator-framework from 167560d7dd to 97b61e3ee1 2023-11-15 11:52:31 +00:00 Compare
Author
Owner

Merged via command line

Merged via command line
jbwdevries closed this pull request 2023-11-16 15:09:14 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jbwdevries/phasm#5
No description provided.