Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Cross-check rcc against other compilers #469

Open
jyn514 opened this issue Jun 7, 2020 · 3 comments
Open

Cross-check rcc against other compilers #469

jyn514 opened this issue Jun 7, 2020 · 3 comments
Labels
testing More tests for the compiler!

Comments

@jyn514
Copy link
Owner

jyn514 commented Jun 7, 2020

We do this at work for our SQL implementation: https://gitlab.com/YottaDB/DBMS/YDBOcto/-/blob/master/tests/test_helpers.bash.in#L551. The basic idea is to run two compilers on the same code and make sure they agree. We could integrate this with existing assert_compiles, etc. tests and make sure that we're testing the right thing. This would also let us take advantage of the existing test suite without much work.

Inspired by @pythondude325 finding that fn redefinition was testing the wrong thing (#470) - the test passed, but it shouldn't have.

@jyn514 jyn514 added the testing More tests for the compiler! label Jun 7, 2020
@pythongirl325
Copy link
Collaborator

This is effectively what I do by testing hexponent against libc's equivalent functions.

@pythongirl325
Copy link
Collaborator

Could we do this very naively by just using cc to write the tests?

@jyn514
Copy link
Owner Author

jyn514 commented Jun 7, 2020

The way I was planning to do this is modifying

pub fn assert_compiles(program: &str, path: PathBuf) {
, etc. to run cc against the code in addition to swcc, yeah.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing More tests for the compiler!
Projects
None yet
Development

No branches or pull requests

2 participants