Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port the tests to stable #10

Open
antoyo opened this issue Dec 12, 2017 · 2 comments
Open

Port the tests to stable #10

antoyo opened this issue Dec 12, 2017 · 2 comments

Comments

@antoyo
Copy link
Owner

antoyo commented Dec 12, 2017

By copy-pasting the files in this crate and creating a compilefail test instead of a ui test.

@Atul9
Copy link

Atul9 commented Jan 25, 2018

@antoyo I would like to take this up. I have a question - copy-pasting from https://github.com/antoyo/tql/tree/master/tests/testcrate to where? Did you mean to create stablecrate in tql/test? & rename ui to compilefail folder?

@antoyo
Copy link
Owner Author

antoyo commented Jan 25, 2018

Instead of copy-pasting, I'd actually prefer to use the include! macro.
Also, it would be nice to add a test that will check if we're missing some tests (to ease maintenance).
So, yes, we can start with the testcrate tests, so create a new crate similar to testcrate.
Since on stable we don't have the right position in the error message, it will be a compilefail (name to be checked) test instead of ui, so you'll need to update this line in the new crate.
Moreover, you won't need the .stderr files (because they belong to ui tests), but you'll need to update the error comments like this one in this testcrate crate because the new crate will only contains include!() macros.
Thanks for your help and if you need more info, feel free to ask.

To sum up:

  • Create a new crate compilefail-stable (or whatever name) in the tests folder.
  • Copy-paste the fail.rs from compilefail tests and change the mode to compilefail (or whatever the name is).
  • Create one with per compile fail test where each file contains an include!() macro call.
  • Add a normal Rust test (alongside fail) which will check that all the files in testcrate/tests/ui are in testcrate-stable/tests/fail.
  • Add the new command to launch this new test on stable in the travis file.

I just thought that using include!() might create issues with compiletest, so maybe we won't be able to use it (please test it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants