Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/lone/types: improve test generation macros
Exhaustively generate every possible test case symbol by defining a macro with every possible parameter and then repeatedly defining partially applied variants for every possible parameter value. The eventual result is a zero arity function which generates a list of test function symbols containing every possible test. The list is comma separated, making it ideal for initializing an array of test cases. If a function is defined in the source code but is not in the test cases array, the compiler emits a warning. If undefined function names are generated by these macros, the compiler emits an error. Also, decompose the lone types into signedness and bits parameters. This also allows generating tests for unaligned 8 bit operations with no unnecessary packed attribute warnings. I know that bytewise memory access is always aligned but test it anyway for completeness.
- Loading branch information