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

Handle #[test] #1265

Open
Lysxia opened this issue Nov 28, 2024 · 0 comments
Open

Handle #[test] #1265

Lysxia opened this issue Nov 28, 2024 · 0 comments

Comments

@Lysxia
Copy link
Collaborator

Lysxia commented Nov 28, 2024

Good rust projects have test suites, and it would be nice to be able to check assertions in test suites using creusot.

cargo creusot -- --tests on a random project fails with:

thread 'rustc' panicked at creusot/src/backend/ty_inv.rs:69:18:
not implemented: dyn [Binder { value: Trait(std::ops::Fn<(&mut test::Bencher,)>), bound_vars: [Region(BrNamed(DefId(26:1712 ~ test[7e83]::types::TestFn::'_#3), '_))] }, Binder { value: Projection(Output = std::result::Result<(), std::string::String>), bound_vars: [Region(BrNamed(DefId(26:1712 ~ test[7e83]::types::TestFn::'_#3), '_))] }, Binder { value: AutoTrait(DefId(2:32809 ~ core[98a5]::marker::Send)), bound_vars: [] }] + 'static

Those dyn seem to come from test::TestFn.

Maybe we can just tell creusot to ignore the generated test wrappers when --test is on.

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

1 participant