Testing
yberreby opened this issue · comments
In a compiler, correctness is absolutely critical. Therefore, we want a very good and comprehensive test suite.
A good way to test the correctness of the compiler would be to piggyback on the official Go compiler's test suite:
- build the official Go compiler with
rgo
- run its test suite, ensuring all tests pass
If we're able to build a 711k SLOC[1] project without panicking and have all its tests pass, we can be reasonably confident that rgo
is working.
We would probably have a git submodule of golang/go, updated once a month or so to make sure our build doesn't unexpectedly fail because of a problem in Go's tests.
[1]: number of lines of Go code reported by $ cloc src
at the root of the Go repository at the time of writing.