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

input with any::<bool>() constraint causes test to run for a long time #60

Closed
udoprog opened this issue Jun 19, 2018 · 2 comments
Closed
Labels
bug This is a bug

Comments

@udoprog
Copy link
Contributor

udoprog commented Jun 19, 2018

Hey,

The following runs for a very long time, and seems to be unable to reduce the input:

#[macro_use]
extern crate proptest;

use proptest::prelude::*;

proptest! {
    fn run_for_a_long_time(v in any::<bool>()) {
        println!("v: {}", v);
        assert!(!v);
    }
}

fn main() {
    run_for_a_long_time();
}

Note that it works when the assert is just assert!(v).

@udoprog udoprog changed the title input with constraint any::<bool>() causes test to run for a long time input with any::<bool>() constraint causes test to run for a long time Jun 19, 2018
@AltSysrq AltSysrq added the bug This is a bug label Jun 20, 2018
@AltSysrq
Copy link
Collaborator

I can't believe I didn't have a test around this. Fix should be up in a bit.

@AltSysrq
Copy link
Collaborator

Fixed in 0.7.2.

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

No branches or pull requests

2 participants