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

Add a way to run an integration test with a non default compiler option #52

Closed
hermanventer opened this issue Jan 25, 2019 · 0 comments
Closed
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@hermanventer
Copy link
Collaborator

Issue

Compiler options can influence the MIR that gets generated. For example, the Rvalue::Len expression may be turned into a constant for -Z mir-opt-level=n where n > 0. Since the default level is 1, cargo test will not run in a mode where the code path that handles Rvalue::Len gets reached.

In order to test this case using cargo test, the code integration_test.rs needs to be enhanced to look for comments that specify which compiler options should be used to compile the test case.

Steps to Reproduce

Add an info level log statement to the code that handles Rvalue::Len and observe that MIRAI_LOG=info cargo test produces no output from this log statement.

Expected Behavior

When this issue is fixed, you can add the compiler option -Z mir-opt-level=0 to the test case array_literal.rs and you should observe a log entry from your added log statement.
What you expected to happen. For example the error message you expected to see.

Actual Results

No test coverage for Rvalue::Len when running cargo test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant