-
Notifications
You must be signed in to change notification settings - Fork 157
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
Converted Rust Test Case to DejaGnu #3071
base: master
Are you sure you want to change the base?
Conversation
Investigate test case from https://github.com/rust-lang/rust/tree/master/tests/ui/anon-params gcc/testsuite/ChangeLog: * rust/compile/anon-params-denied-2018.rs: New test. * rust/compile/anon-params-deprecated.rs: New test. Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
Additionally, there are some mismatches between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice that you've adapted the error messages to be the ones output by gccrs. I think our strategy for now should be the following:
- If there is an error code, then take it and copy it for the
dg-error
message - otherwise, just add an empty
dg-error
we don't want the error messages to match exactly, but we do want the error codes to match exactly. in the future, we can think about doing something like a map from Rust error messages to gccrs error messages, but that should come later :)
// { TODO "expecting .:. but .,. found" "" { target *-*-* } .-1 } | ||
// { TODO "expecting .\\). but .,. found" "" { target *-*-* } .-2 } | ||
//~^ ERROR expected one of `:` | ||
//~| ERROR expected one of `:` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are those TODO
because gccrs doesn't output an error here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, gccrs doesn't omits output here (see line 16
here: https://godbolt.org/z/MGdE35PPT) maybe due to excess errors. However, it emits output for fn
definition, see here: https://godbolt.org/z/WEr89c5xq.
I suggest we eventually put these "external" test cases into a separate directory, which then also contains some You may extend the |
yeah, I believe the best thing would be to go with a separate .exp file because we might eventually want to tweak it as you said Thomas. so I would just copy the |
Sure. I'll work on that. Also, the test cases in this PR have very different output on rustc (see this: https://godbolt.org/z/MGdE35PPT). So, should I update this PR with only with the error codes of rustc? |
ported from <https://github.com/rust-lang/rust/blob/master/tests/ui/associated-types/issue-22037.rs> Manually converted testcase to dejagnu format according to Rust-GCC#3071 (review) gcc/testsuite/ChangeLog: * rust/external/associated-type.rs: New test. Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
A very simple PR to Investigate test case from https://github.com/rust-lang/rust/tree/master/tests/ui/anon-params. To convert this into equivalent Rust source file with
dejagnu
directives instead ofERROR
directivesgcc/testsuite/ChangeLog
:Details
Thanks to this email thread: https://patchwork.ozlabs.org/project/gcc/patch/20160922200546.GH7282@tucnak.redhat.com/. I was able to understand the relative line number. Otherwise, it would be difficult to stop dejagnu from shouting