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

Explain the different style of tests in CONTRIBUTING.md #24802

Closed
tbelaire opened this issue Apr 25, 2015 · 2 comments
Closed

Explain the different style of tests in CONTRIBUTING.md #24802

tbelaire opened this issue Apr 25, 2015 · 2 comments

Comments

@tbelaire
Copy link
Contributor

I feel like it would be really helpful if the different kinds of tests were explained nicely somewhere, since there are a lot of different kinds, and it's a little hard to guess which kind I'll need to write, so I have to look at a lot of examples each time.

In particular, the semantics of the lines such as:

 //~^ HELP ...

are clear enough when reading, but I'm not really sure how it works in detail.
For example, in src/test/parse-fail/mod_file_not_exists.rs has on line 14

 //~^ HELP name the file either not_a_real_file.rs or not_a_real_file/mod.rs inside the directory

but the actual error message is

help: name the file either not_a_real_file.rs or not_a_real_file/mod.rs inside the directory ""

With the extra "" at the end, so is it some sort of fuzzy match, or just prefix or what? Also when do you chose between //~ and //~^, is that only for placing the comment and are these the same:

foo //~ HELP whatever
foo
//~^ HELP whatever

Or is there more going on?

It'd also be quite nice to have a one line summary of the different test types, clarifying how compile-fail-fulldeps is different from compile-fail, etc. I know I can figure it out given long enough, but it'd save a lot of time. Thanks!

auxiliary
bench
codegen
compile-fail
compile-fail-fulldeps
debuginfo
parse-fail
pretty
run-fail
run-make
run-pass
run-pass-fulldeps
run-pass-valgrind
rustdoc
@jooert
Copy link
Contributor

jooert commented Jun 10, 2015

Perhaps it would be sufficient to link to https://github.com/rust-lang/rust-wiki-backup/blob/master/Note-testsuite.md from CONTRIBUTING.md for the moment?

@tbelaire
Copy link
Contributor Author

Yes! That's exactly what I was looking for and couldn't find.

On Wed, Jun 10, 2015 at 10:27 AM, jooert [email protected] wrote:

Perhaps it would be sufficient to link to
https://github.com/rust-lang/rust-wiki-backup/blob/master/Note-testsuite.md
from CONTRIBUTING.md for the moment?


Reply to this email directly or view it on GitHub
#24802 (comment).

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

No branches or pull requests

3 participants