Skip to content

Commit

Permalink
Merge pull request #177 from Centril/release-0.9.5
Browse files Browse the repository at this point in the history
Release proptest 0.9.5
  • Loading branch information
Centril authored Jan 17, 2020
2 parents 5341d3e + fd2fefe commit afc4e16
Show file tree
Hide file tree
Showing 50 changed files with 101 additions and 4 deletions.
2 changes: 1 addition & 1 deletion book/src/proptest/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ In `Cargo.toml`, add

```toml
[dev-dependencies]
proptest = "0.9.4"
proptest = "0.9.5"
```

Now we can add some property tests to our date parser. But how do we test
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0001-lifetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0001]
//~| [proptest_derive, E0008]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0002-no-unions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Arbitrary)] //~ ERROR: [proptest_derive, E0002]
union Foo { x: usize }
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0003-void-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0003]
//~| [proptest_derive, E0008]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0004-void-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0004]
enum Void {}

Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0005-void-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0005]
enum T0 {
V0(!),
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0006-void-enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0006]
//~| [proptest_derive, E0008]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0007-illegal-strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0007]
//~| [proptest_derive, E0030]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0008-illegal-skip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Clone, Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0008]
//~| [proptest_derive, E0007]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0009-illegal-weight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0009]
//~| [proptest_derive, E0030]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0010-parent-has-params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

// Show non-fatal:

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0011-params-variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0011]
enum T0 {
#[proptest(params = "String")]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0012-parent-has-filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

fn even(x: &u8) -> bool {
x % 2 == 0
}
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0014-bare-attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0014]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0015-lit-set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ 2 errors:
//~| [proptest_derive, E0015]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0016-immediate-lit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0016]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0017-set-again.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors
//~| # [proptest_derive, E0017]
//~| # [proptest_derive, E0030]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0018-unknown-mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0018]
#[proptest(no_bounds)]
struct T0<T>(T);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0019]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0020-skip-malformed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

// Show non fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0020]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0021-weight-malformed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0021]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0022-overspec-param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0022]
#[proptest(no_params, params = "u8")]
enum T0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0023]
#[proptest(params = "1/2")]
enum T0 {
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0023-params-malformed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
extern crate proptest_derive;
use proptest_derive::Arbitrary;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0023]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0025-overspec-strat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

// value + strategy:

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0025]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0026]
enum T0 {
V1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0026]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0027]
enum T0 {
V1 {
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0027-filter-malformed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0027]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors
//~| [proptest_derive, E0028]
//~| [proptest_derive, E0006]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors
//~| [proptest_derive, E0028]
//~| [proptest_derive, E0006]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors
//~| [proptest_derive, E0028]
//~| [proptest_derive, E0006]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors
//~| [proptest_derive, E0028]
//~| [proptest_derive, E0006]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0029]
//~| [proptest_derive, E0008]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0029]
//~| [proptest_derive, E0008]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0029]
//~| [proptest_derive, E0008]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

// It happens that no other error will follow E0030 so this is not as proper
// a check that we wanted to ensure that E0030 is non-fatal.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0031]
//~| [proptest_derive, E0008]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0032]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0033-weight-overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0033]
Expand Down
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/E0034-regex-malformed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0034]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

// Show non-fatal:
#[derive(Debug, Arbitrary)] //~ ERROR: 2 errors:
//~| [proptest_derive, E0035]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ extern crate proptest;

use proptest::prelude::*;

fn main() {}

#[derive(Arbitrary, Debug)]
struct T0 {
#[no_params] //~ ERROR: [E0658]
#[no_params] //~ ERROR: cannot find attribute `no_params` in this scope
field: usize,
}
2 changes: 2 additions & 0 deletions proptest-derive/tests/compile-fail/must-be-debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
#[macro_use]
extern crate proptest_derive;

fn main() {}

#[derive(Arbitrary)] //~ `Foo` doesn't implement `std::fmt::Debug` [E0277]
struct Foo { x: usize }
Loading

0 comments on commit afc4e16

Please sign in to comment.