Re:In praise of property-based testing (2019)
by pfdietz on Saturday April 03, 2021 @02:05PM
(#26683218)
It's great for compiler testing.
The first approach is to generate random correct programs and see if they do the same thing with different compilers and/or different optimization flags.
The second approach is to take a correct program, note that some parts of it are not executed on some particular input, then mutate that part and run on the same input. The output should be the same.
Also, any program (not just compilers) should satisfy the properties that no assertions fail and that no sanitizer failures occur.
The first approach is to generate random correct programs and see if they do the same thing with different compilers and/or different optimization flags.
The second approach is to take a correct program, note that some parts of it are not executed on some particular input, then mutate that part and run on the same input. The output should be the same.
Also, any program (not just compilers) should satisfy the properties that no assertions fail and that no sanitizer failures occur.