commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
2083e797bb004387249340e3cd45370d262e5cab
Jake Goulding
2017-01-20T17:52:26
Add categories to Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index 643149f..e2dc910 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ homepage = "https://github.com/BurntSushi/quickcheck" repository = "https://github.com/BurntSushi/quickcheck" readme = "README.md" keywords = ["testing", "quickcheck", "property", "shrinking", "fuzz"]...
1
1
0
6c9629051347a2be22c6f6111fe9fba3f0fdeac3
bryal
2017-01-08T17:32:30
Implement `Arbitrary` for `Box`
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 8fb836c..43ea550 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -674,6 +674,15 @@ impl Arbitrary for Duration { } } +impl<A: Arbitrary> Arbitrary for Box<A> { + fn arbitrary<G: Gen>(g: &mut G) -> Box<A> { + Box::new(A::arbitrary(g)) + ...
1
9
0
8899a8cbd4b588f83581614416e65063b225aa07
Andrew Gallant
2017-01-02T22:11:53
quickcheck_macros-0.4.1
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index d9b0935..1ddc77a 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.4.0" #:version +version = "0.4.1" #:version authors = ["Andrew Gallant <jam...
1
1
1
d6f49b345abdbeb76869faf51eba6b0afdd26601
Anders Kaseorg
2016-12-24T00:53:27
quickcheck_macros: Update for rust-lang/rust#37824 “Clean up `ast::Attribute`, `ast::CrateConfig`, and string interning” Resolves these errors: error[E0425]: unresolved name `token::intern` --> src/lib.rs:27:35 | 27 | reg.register_syntax_extension(token::intern("quickcheck"), | ...
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 5481b92..d9b0935 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -21,4 +21,4 @@ path = "examples/attribute.rs" [dependencies.quickcheck] path = ".." -version = "0.3" +version = "0.4" diff --git a/quickchec...
2
6
6
f0e83b1014d9dfea72d9ff381630f987148f4e52
J David Smith
2016-12-07T21:36:55
Added test for macro attrs. This is done by writing a test with `assert!(false)` with the `#[should_panic]` attr attached. If the macro is working correctly, this test passes. If not, it fails.
diff --git a/src/tests.rs b/src/tests.rs index f8c2a37..c1d6fca 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -31,6 +31,12 @@ quickcheck! { let revrev: Vec<_> = rev.into_iter().rev().collect(); xs == revrev } + + #[should_panic] + fn prop_macro_panic(_x: u32) -> bool { + assert!(fa...
1
6
0
09f2862b7b5b30c05771ca183ed28f91ddcbaa60
J David Smith
2016-12-07T21:14:56
Added attr support to quickcheck! macro. This means it is now possible to do things like: quickcheck! { #[ignore] fn prop(...) -> bool { ... } }
diff --git a/src/lib.rs b/src/lib.rs index 99c3ce5..fd27d69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,6 +46,7 @@ macro_rules! quickcheck { (@as_items $($i:item)*) => ($($i)*); { $( + $(#[$m:meta])* fn $fn_name:ident($($arg_name:ident : $arg_ty:ty),*) -> $ret:ty { ...
1
2
0
5d0aa4162375cf0cd95d58b15276ae7c49f4e6e7
Brian L. Troutwine
2016-11-07T04:15:49
Add in controlling of Gen size through the environment In a like fashion to the QUICKCHECK_TEST and QUICKCHECK_MAX_TESTS it's awfully handy to be able to crank the size of the default Gen upward without having to recompile. Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
diff --git a/src/tester.rs b/src/tester.rs index 358502a..6f3a231 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -31,6 +31,14 @@ fn qc_max_tests() -> usize { } } +fn qc_gen_size() -> usize { + let default = 100; + match env::var("QUICKCHECK_GENERATOR_SIZE") { + Ok(val) => val.parse().unwrap_or(d...
1
10
1
ae4975ef2948785aae6032ddbaf2fb895fe8fdab
Brian L. Troutwine
2016-11-06T15:28:20
Incorporate feedback on initial approach This commit removes the panic when the input value is not able to be parsed and silently replaces whatever goofy value may have been sent with defaults. There is a logging facility that can be exploited to inform the user that a potential mistake has been made but this commit d...
diff --git a/src/tester.rs b/src/tester.rs index b675fd0..358502a 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -16,20 +16,21 @@ pub struct QuickCheck<G> { } fn qc_tests() -> usize { - match env::var("QC_TESTS") { - Ok(val) => val.parse().expect("QC_TESTS value could not converted to number"), - ...
1
8
7
1cc9e3eabbebe2ca9387a7d429b91586e123a894
Andrew Gallant
2016-10-27T23:31:43
quickcheck_macros-0.4.0
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 2e5e77a..5481b92 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.2.29" #:version +version = "0.4.0" #:version authors = ["Andrew Gallant <ja...
1
1
1
f70d96c0adacd5c95b1a610098fae138267339bc
Andrew Gallant
2016-10-27T23:30:46
Reduce the number of tuple impls from 12 to 8. The goal is to reduce compile times. Callers can work around this by nesting tuples. Fixes #146.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 422c07d..8fb836c 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -192,14 +192,6 @@ impl_arb_for_tuple!((a, A), (b, B), (c, C), (d, D), (e, E), (f, F), (g, G)); impl_arb_for_tuple!((a, A), (b, B), (c, C), (d, D), (e, E), (f, F), ...
2
0
12
57c5388d333013a1e6b8fedafdc7d02b8cdf969e
Andrew Gallant
2016-10-27T23:17:27
quickcheck_macros-0.2.29
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index ccf5335..2e5e77a 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.2.28" #:version +version = "0.2.29" #:version authors = ["Andrew Gallant <j...
1
1
1
7ece0d3c63b8cf286b08e7b5612ba8c30fb85f76
Utkarsh Kukreti
2016-10-25T04:36:32
Fix for `rustc 1.14.0-nightly (f09420685 2016-10-20)`. Fixes #149.
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index 804fac1..9aa6cb0 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -10,7 +10,6 @@ extern crate syntax; extern crate rustc_plugin; -use syntax::abi::Abi; use syntax::ast; use syntax::ast::{ItemKind, StmtKin...
1
1
15
22e4e1c5f9200df1af15625bff2cf980490c8f32
Brian L. Troutwine
2016-10-21T21:58:07
Allow QC_TESTS and QC_MAX_TESTS to set tests / max_tests In practice I've wanted two kinds of quickcheck runs: fast and comprehensive. To date the comprehensive testing has been done by manually adjusting tests / max_tests up from the defaults of 100 / 10000. This involves a recompilation step. If quickcheck were abl...
diff --git a/src/tester.rs b/src/tester.rs index 8fed5b9..b675fd0 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -1,5 +1,7 @@ use std::fmt::Debug; use std::panic; +use std::env; +use std::cmp; use rand; @@ -13,6 +15,21 @@ pub struct QuickCheck<G> { gen: G, } +fn qc_tests() -> usize { + match env::v...
1
21
2
b63425798ed213b05b50b279151fbac5135a7c46
bluss
2016-10-01T15:04:31
Use format!() less in testable_fn!() Use more of a runtime-level function to debug format each argument (using a slice of &Debug). This results in much less code bloat from `format!("{:?}")` and reduces the crate's compile time a bit. This also clones the argument tuple less.
diff --git a/src/tester.rs b/src/tester.rs index 8fed5b9..93d2eda 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -255,6 +255,11 @@ impl<A, E> Testable for Result<A, E> } } +/// Return a vector of the debug formatting of each item in `args` +fn debug_reprs(args: &[&Debug]) -> Vec<String> { + args.iter().ma...
1
13
4
db5e088bba239fac5c45983562eca4605e968c46
bluss
2016-10-01T11:36:37
Add crate feature "use_logging" that's enabled by default
diff --git a/Cargo.toml b/Cargo.toml index e0b7fae..2a50829 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,13 @@ license = "Unlicense/MIT" [features] unstable = [] +use_logging = ["log", "env_logger"] +default = ["use_logging"] [lib] name = "quickcheck" [dependencies] -env_logger = "0.3" -log = "0.3"...
3
21
4
1d909b6d256439b93a621e045a834551ea8d713b
Andrew Gallant
2016-07-21T22:50:58
Fix doc test. Weird bug...
diff --git a/src/lib.rs b/src/lib.rs index eb3118e..784a1a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,7 +36,7 @@ pub use tester::{QuickCheck, Testable, TestResult, quickcheck}; /// let revrev: Vec<_> = rev.into_iter().rev().collect(); /// xs == revrev /// } -/// } +/// }; /// # } /// ``` ...
1
1
1
8042f9dca73fca8bb3c77dcde7ed5ea5d23f404b
Andrew Gallant
2016-07-21T22:47:11
quickcheck_macros 0.2.28
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index a565c97..ccf5335 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.2.27" #:version +version = "0.2.28" #:version authors = ["Andrew Gallant <j...
1
2
2
604a0cea637b3582425474de847d8e3fdc78d96e
Andrew Gallant
2016-07-21T22:37:05
Use catch_unwind instead of spawning a thread for every test.
diff --git a/src/tester.rs b/src/tester.rs index ea61a34..8fed5b9 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -1,8 +1,10 @@ -use rand; use std::fmt::Debug; -use std::thread; -use super::{Arbitrary, Gen, StdGen}; +use std::panic; + +use rand; + use tester::Status::{Discard, Fail, Pass}; +use {Arbitrary, Gen, Std...
1
8
12
74a5c0f895ef70101860ff43ef1deb98f8eaef4f
Andrew Gallant
2016-07-21T22:36:26
Add a quickcheck macro, courtesy of @bluss. Closes #131.
diff --git a/src/lib.rs b/src/lib.rs index f33b7dc..eb3118e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,6 +17,53 @@ pub use arbitrary::{ pub use rand::Rng; pub use tester::{QuickCheck, Testable, TestResult, quickcheck}; +/// A macro for writing quickcheck tests. +/// +/// This macro takes as input one or more p...
2
55
0
a8df162080ff98b9f0dd6065da8a91ae6dcfc8c6
Andrew Gallant
2016-07-10T04:38:52
quickcheck_macros 0.2.27
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index b8778f9..a565c97 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.2.26" #:version +version = "0.2.27" #:version authors = ["Andrew Gallant <j...
1
1
1
126d1de8fca3aacc3699f9c83292ce972903b485
Aaron Gallagher
2016-07-09T23:07:49
Update for Rust nightly 2016-07-08. Specifically, rust-lang/rust@5e18b4bad8450622aef8e077d3470f5626403588.
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index da92d7e..804fac1 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -12,7 +12,7 @@ extern crate rustc_plugin; use syntax::abi::Abi; use syntax::ast; -use syntax::ast::{DeclKind, ItemKind, StmtKind, TyKind}; +...
1
12
6
8d210b3fdc73d6c2ff71bb000b82035ed32b0bf7
Andrew Gallant
2016-03-10T11:35:00
Remove unused imports.
diff --git a/src/tester.rs b/src/tester.rs index b8a8006..557369e 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -338,8 +338,8 @@ impl<A: Arbitrary + Debug> AShow for A {} #[cfg(test)] mod test { - use {QuickCheck, StdGen, quickcheck}; - use super::TestResult; + use QuickCheck; + #[test] fn sh...
1
2
2
e908c66189b8943ca48b23a3c280db0eb0cf8201
Ceri Storey
2016-03-10T10:47:55
Introduce regression test for issue #126.
diff --git a/src/tester.rs b/src/tester.rs index 2f9d041..b8a8006 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -335,3 +335,18 @@ fn safe<T, F>(fun: F) -> Result<T, String> /// Convenient aliases. trait AShow : Arbitrary + Debug {} impl<A: Arbitrary + Debug> AShow for A {} + +#[cfg(test)] +mod test { + use {Q...
1
15
0
5b19e7c21e1afdcabb894668ad61be70bb023ef0
Ceri Storey
2016-03-09T16:31:13
Port over the shrinking behavior from before f017c01.
diff --git a/src/tester.rs b/src/tester.rs index 481903e..2f9d041 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -264,26 +264,38 @@ impl<T: Testable, $($name: Arbitrary + Debug),*> Testable for fn($($name),*) -> T { #[allow(non_snake_case)] fn result<G_: Gen>(&self, g: &mut G_) -> TestResult { + ...
1
25
13
7edead329f6748e23101aef9403c7afa83b1114f
Sean Griffin
2016-03-09T16:09:26
time2 has been stabilized `duration_from_earlier` was renamed to `duration_since`, and the time2 feature is no longer needed. This can be removed from the unstable feature gate once 1.8 is released, but these changes are required to compile on beta and nightly.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index dd6a654..422c07d 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -700,7 +700,7 @@ mod unstable_impls { } fn shrink(&self) -> Box<Iterator<Item=Self>> { - let duration = match self.duration_from_earlier(UNIX_EPOCH) { + ...
2
1
2
c9438a39cc5f3f3aea3d6cef941c840bbe94a16c
Andrew Gallant
2016-02-16T12:27:51
quickcheck_macros 0.2.26
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index ca66041..b8778f9 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.2.25" #:version +version = "0.2.26" #:version authors = ["Andrew Gallant <j...
1
1
1
dcc4489ef04ab4e5cd03607541f62757df7b46ac
Aaron Gallagher
2016-02-16T06:54:57
Update for Rust nightly 2016-02-12. Specifically, rust-lang/rust@ce4b75f25662cb9facafc4bef368410a2979b936.
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index 560d1cb..da92d7e 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -10,9 +10,9 @@ extern crate syntax; extern crate rustc_plugin; -use syntax::abi; +use syntax::abi::Abi; use syntax::ast; -use syntax::ast::...
1
12
15
87c21d6cfb38f2ea50dd028b5c2b4b682cbabfa8
Andrew Gallant
2016-01-27T22:01:11
version bump quickcheck_macros
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index d2252c9..ca66041 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.2.24" #:version +version = "0.2.25" #:version authors = ["Andrew Gallant <j...
1
1
1
42406eddeafff69fcfc4b035f10178f314c83124
Andrew Gallant
2016-01-27T22:00:15
formatting
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 9abc3ee..dd6a654 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -414,7 +414,7 @@ impl Arbitrary for String { } impl Arbitrary for char { - fn arbitrary<G: Gen>(g: &mut G) -> char { + fn arbitrary<G: Gen>(g: &mut G) -> char { let mode = ...
1
4
3
f5e47296a1e29ed6bac666962a13994dcb3ec095
Andrew Gallant
2016-01-27T21:52:47
Add regression test for #107. Fixes #107.
diff --git a/src/tests.rs b/src/tests.rs index 272d619..e61abf5 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -192,3 +192,12 @@ fn panic_msg_3() { } quickcheck(prop as fn() -> bool); } + +#[test] +#[should_panic] +fn regression_issue_107_hang() { + fn prop(a: Vec<u8>) -> bool { + a.contains(&1) +...
1
9
0
5462a0b6b1eea0b4f5164d37b8db1c0ce63f3c0b
mcarton
2016-01-27T21:47:06
Cleanup some warnings from Clippy
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 3d70edf..9abc3ee 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -96,9 +96,11 @@ impl Arbitrary for bool { fn arbitrary<G: Gen>(g: &mut G) -> bool { g.gen() } fn shrink(&self) -> Box<Iterator<Item=bool>> { - match *self { - tru...
3
17
15
d08fb01954e47809e6bf2fcd12a9c449e3649a2a
Andrew Gallant
2016-01-27T21:33:22
Revert "Merge pull request #100 from SeanRBurton/master" This reverts commit 1a7be7d83b1ad1d2ab9bce1575dfb980540888a4, reversing changes made to 49db7a76dfc976c3c6c1e7f7b95133616b52bec0. # Conflicts: # src/arbitrary.rs # src/tester.rs
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index ce182f0..8df62a8 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -12,8 +12,6 @@ use std::hash::Hash; use std::iter::{empty, once}; use std::ops::{Range, RangeFrom, RangeTo, RangeFull}; use std::time::Duration; -use entropy_pool::EntropyPool; -use shrink:...
5
73
545
39ecfacf6ec9e19cadaaf7d610d8b9a8edeb52a7
Sean Bowe
2015-12-23T19:10:01
Fixed regression in nightly
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index ab1a32f..560d1cb 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -13,7 +13,6 @@ extern crate rustc_plugin; use syntax::abi; use syntax::ast; use syntax::ast::Ty_::TyBareFn; -use syntax::ast_util; use synta...
1
1
2
cd742cd70ce8ddfcda9d8afa312c8f33398cc56b
Vitaly _Vi Shukela
2015-12-15T05:19:54
Arbitrary char: Simplify a line according to a comment
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 0cc5765..d8dab62 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -461,7 +461,7 @@ impl Arbitrary for char { match mode { 0...49 => { // ASCII + some control characters - char::from_u32(g.gen_range(0, 0xB...
1
1
1
52c775a70008b8448bc6f6aa6d49c5e5560f15c8
Vitaly _Vi Shukela
2015-12-13T00:26:46
Bias generated `char`s (#99) That's how generated strings typically looks now: Oò»¹„[.? }'셥-‰91(]ª!ñŠ·‡ #* "9ôŒ£´‘:؀{乸0%㯓9똁⁔Rz릉¤t󣱅? (]>‘ <܏nf)*ᖯ'—ñ‹’°6>¦ó¤‹¡匈#$'`맽ô€€€c￸HX)[r莅3*A 𹓧7] G_媣<ꉟต8~^i7䱄釱fh)+{G™0“ ﵽ❔K/5‴9[꤅X1J[M&4[؜¥" ⇉Ɩ©42폨ĒUñ˜¸˜5.`'O§...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index ce182f0..0cc5765 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -456,7 +456,70 @@ impl Arbitrary for String { } impl Arbitrary for char { - fn arbitrary<G: Gen>(g: &mut G) -> char { g.gen() } + fn arbitrary<G: Gen>(g: &mut G) -> char { + ...
1
64
1
cf02bc292c68e2f9f8c400dcfb63f9206951cab0
bluss
2015-12-06T07:35:58
Fix showing the message after panic from panic!() or assert!() Typical panics produce either &str or String (depending if formatting is used or not), so we use a simple type switch to handle these two after a panic in a test case.
diff --git a/src/tester.rs b/src/tester.rs index 9a41b60..557c742 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -414,9 +414,14 @@ fn safe<T, F>(fun: F) -> Result<T, String> where F: FnOnce() -> T, F: Send + 'static, T: Send + 'static { let t = ::std::thread::Builder::new().name("safe".into()); t....
2
38
3
f6cebd2a43a7f93122ee92408de72c42d267868a
Sean Griffin
2015-12-03T15:05:43
Add `shrink` functions for `Duration` and `SystemTime`
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index f3fe990..ce182f0 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -649,6 +649,13 @@ impl Arbitrary for Duration { let nanoseconds = u32::arbitrary(gen) % 1_000_000; Duration::new(seconds, nanoseconds) } + + fn shrink(&self) -> Box<I...
1
15
0
32c7bdca8921b3ba0702b6e6ce0909905664c268
Sean Griffin
2015-12-02T18:58:41
Fix the travis build on nightly As of https://github.com/rust-lang/rust/pull/30043, `rustc::plugin` is now `rustc_plugin`.
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index 02267cf..ab1a32f 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -8,7 +8,7 @@ #![feature(plugin_registrar, rustc_private)] extern crate syntax; -extern crate rustc; +extern crate rustc_plugin; use synta...
1
2
2
7020692b18196d9d29718b31d8b2c7d1c4df3190
Sean Griffin
2015-12-02T18:33:51
Add support for std::time::{Duration, SystemTime} Arbitrary SystemTime can only be generated when built with `--features unstable`. It doesn't seem like new arbitrary implementaions normally get tested, so I've not added any tests for these. I also can't think of any particularly important values for `shrink` here, as...
diff --git a/Cargo.toml b/Cargo.toml index fb7b7f7..9c6bef5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,9 @@ readme = "README.md" keywords = ["testing", "quickcheck", "property", "shrinking", "fuzz"] license = "Unlicense/MIT" +[features] +unstable = [] + [lib] name = "quickcheck" diff --git a/src/arbi...
3
32
0
7562c45bcd48c47740c89b90ac53796709e8d30d
bluss
2015-11-25T03:45:40
Use std::iter::empty inside empty_shrinker The `empty` iterator is a zero sized type, and this way the empty shrinker (also the default shrinker) uses no allocation at all. empty and once require Rust 1.2 or later.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index c2d1789..01a729b 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -9,6 +9,7 @@ use std::collections::{ VecDeque, }; use std::hash::Hash; +use std::iter::{empty, once}; use std::ops::{Range, RangeFrom, RangeTo, RangeFull}; use entropy_pool::EntropyPo...
1
3
2
392de2dd9dc7919e44c9467d12dcfc100220c121
Sean
2015-10-27T09:53:03
Remove duplicated `reset` method from Gen trait.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index af29326..c2d1789 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -22,7 +22,6 @@ use rand::Rng; /// `gen` function in this crate. pub trait Gen : Rng { fn size(&self) -> usize; - fn reset(&mut self) {} fn shrink_gen(&mut self) -> bool { false ...
1
0
1
f017c019abc9cdf277d3d1f2bb637b86ff8a5826
Sean
2015-10-20T10:08:59
Significant refactoring and simplification.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index d3633f1..32bcb30 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -20,6 +20,7 @@ use rand::Rng; /// `gen` function in this crate. pub trait Gen : Rng { fn size(&self) -> usize; + fn reset(&mut self) {} } /// StdGen is the default implementation...
2
55
162
f0c046504c83ef43d8517055b85fc3acf6cfd32e
Sean
2015-10-19T21:46:05
Remove the dependency on num + remove #[inline(always)]
diff --git a/Cargo.toml b/Cargo.toml index ad87410..fb7b7f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,5 +16,4 @@ name = "quickcheck" [dependencies] env_logger = "0.3" log = "0.3" -num = "*" rand = "0.3" diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 2ec6eb6..c2d1789 100644 --- a/src/arbitrary.rs +++ b...
4
48
78
d9fa679459c20d96ea121734fe62cf153a3eb8db
Sean
2015-10-15T13:04:24
Documentation change.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 657a6b0..2ec6eb6 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -133,6 +133,9 @@ pub fn single_shrinker<A: 'static>(value: A) -> Box<Iterator<Item=A>> { /// They must also be sendable and static since every test is run in its own /// thread using `thread...
1
3
0
0723372bfd250727b2e921eb405b02c2d6198c99
Sean
2015-10-15T13:02:05
Last small changes.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index d52160f..657a6b0 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -20,7 +20,7 @@ use rand::Rng; /// /// A value with type satisfying the `Gen` trait can be constructed with the /// `gen` function in this crate. -pub trait Gen : Rng + Sized { +pub trait Ge...
2
2
5
62b52514a3a3700b14a71ed021ed2e141d297b02
Sean
2015-10-15T12:57:30
Make the pull request much simpler and smaller.
diff --git a/Cargo.toml b/Cargo.toml index fb7b7f7..ad87410 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,4 +16,5 @@ name = "quickcheck" [dependencies] env_logger = "0.3" log = "0.3" +num = "*" rand = "0.3" diff --git a/src/arbitrary.rs b/src/arbitrary.rs index d3633f1..d52160f 100644 --- a/src/arbitrary.rs +++ b...
6
145
75
5b32c28580ef608a6be7e94b97d5bb73a9e63352
Sean
2015-10-13T11:56:17
Remove unstable feature.
diff --git a/src/entropy_pool.rs b/src/entropy_pool.rs index 71e580b..bd1b8e5 100644 --- a/src/entropy_pool.rs +++ b/src/entropy_pool.rs @@ -1,6 +1,5 @@ extern crate rand; -use std::slice::bytes::copy_memory; use std::iter; use std::mem; use std::ptr; @@ -50,7 +49,7 @@ impl<R: Rng> Rng for EntropyPool<R> { ...
2
10
6
748bc0260a46c18abe9fdcaf3680041b0f471f38
Sean
2015-10-13T11:47:49
Add entropy_pool.rs
diff --git a/src/entropy_pool.rs b/src/entropy_pool.rs new file mode 100644 index 0000000..71e580b --- /dev/null +++ b/src/entropy_pool.rs @@ -0,0 +1,83 @@ +extern crate rand; + +use std::slice::bytes::copy_memory; +use std::iter; +use std::mem; +use std::ptr; + +use rand::Rng; + +#[derive(Debug)] +pub struct EntropyPo...
1
83
0
01b71596acaea1da470037e0c24482ee81d389bc
Sean
2015-10-13T11:44:13
Oops.. Forgot to add shrink.rs
diff --git a/src/shrink.rs b/src/shrink.rs new file mode 100644 index 0000000..b6b9617 --- /dev/null +++ b/src/shrink.rs @@ -0,0 +1,368 @@ +use num::traits::NumCast; +use std::cmp; +use std::marker::PhantomData; +use std::mem; +use std::ops::{Div, Rem, Sub}; +use std::ptr; + +pub trait Shrinker { + fn new(&[u8]) -> ...
1
368
0
42544fd0738ab77440dc5d4ed7619b23251158e6
Peter Marheine
2015-09-21T00:01:53
Use `env_logger` to support `RUST_LOG` again
diff --git a/Cargo.toml b/Cargo.toml index 47d9c29..fb7b7f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,5 +14,6 @@ license = "Unlicense/MIT" name = "quickcheck" [dependencies] +env_logger = "0.3" log = "0.3" rand = "0.3" diff --git a/src/lib.rs b/src/lib.rs index 2bbd6f1..f33b7dc 100644 --- a/src/lib.rs +++ b...
3
5
0
a0aba4b5c6d1919ed626704609d014199dd82c68
Erick Tryzelaar
2015-09-20T21:37:09
Add Arbitrary impls for BTree{Map,Set},BinaryHeap,LinkedList,VecDeque
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index f0f2e56..d3633f1 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1,5 +1,13 @@ use std::char; -use std::collections::hash_map::HashMap; +use std::collections::{ + BTreeMap, + BTreeSet, + BinaryHeap, + HashMap, + HashSet, + LinkedList, + ...
1
150
10
ffe80cbd0785d0372c8f6af9855f19279a1abb85
Erick Tryzelaar
2015-09-20T21:36:37
Add Arbitrary impls for Range{,From,To,Full}
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 614330e..f0f2e56 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1,6 +1,7 @@ use std::char; use std::collections::hash_map::HashMap; use std::hash::Hash; +use std::ops::{Range, RangeFrom, RangeTo, RangeFull}; use rand::Rng; @@ -471,6 +472,37 @@ imp...
1
43
0
9ddac60989d3aedd830085863ac2a8521d967d26
Andrew Gallant
2015-08-30T15:42:31
remove * deps
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 5fa2d0f..fcf4c40 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -21,4 +21,4 @@ path = "examples/attribute.rs" [dependencies.quickcheck] path = ".." -version = "*" +version = "0.2"
1
1
1
28e9d5d8713b14b1ab9543e3e6976c6b2c1988bc
Andrew Gallant
2015-07-27T21:44:43
Fixes #82. This exports `rand::Rng`, which is from the `rand` crate. It isn't strictly necessary, but this will no longer require callers to add `rand` as a dependency to their `Cargo.toml`.
diff --git a/src/lib.rs b/src/lib.rs index 796dda7..2bbd6f1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,7 @@ pub use arbitrary::{ Arbitrary, Gen, StdGen, empty_shrinker, single_shrinker, }; +pub use rand::Rng; pub use tester::{QuickCheck, Testable, TestResult, quickcheck}; mod arbitrary;
1
1
0
0fb2f99311586580fb84f1a8bbc0a0f6fdebf09f
Andrew Gallant
2015-07-27T21:37:44
Fix #83.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 04e1f6f..614330e 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -367,7 +367,11 @@ macro_rules! unsigned_arbitrary { impl Arbitrary for $ty { fn arbitrary<G: Gen>(g: &mut G) -> $ty { #![allow(trivial_numeri...
3
26
5
848acee19b180b44f7cf1d74ac431bd68efd8667
Andrew Gallant
2015-06-14T21:40:46
Change the Arbitrary impl for `String` to generate a real Unicode string. If we want ASCII, then we should add a new type explicitly for that purpose.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 72dc09e..04e1f6f 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -300,7 +300,11 @@ impl<K: Arbitrary + Eq + Hash, V: Arbitrary> Arbitrary for HashMap<K, V> { impl Arbitrary for String { fn arbitrary<G: Gen>(g: &mut G) -> String { let size = {...
1
5
1
a56c4df96abaa037cd96a029205561be8bf2d5b4
root
2015-05-26T17:58:52
Update to use MultiModifier Modifier is deprecated.
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index 8950362..02267cf 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -16,7 +16,7 @@ use syntax::ast::Ty_::TyBareFn; use syntax::ast_util; use syntax::codemap; use syntax::parse::token; -use syntax::ext::base::{...
1
7
6
be95d69f1ce6b48ad6c7a15218f60e34e0b02052
root
2015-05-26T17:55:45
Update for ItemFn change in rust nightly
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index 038d8ca..8950362 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -54,7 +54,7 @@ fn expand_meta_quickcheck(cx: &mut ExtCtxt, _: &ast::MetaItem, item: P<ast:...
1
2
1
d4b95f44d214f4974fcfa4b06bf2eeed1fc42dca
Eduard Bopp
2015-05-19T10:20:24
Implement Testable for () This allows for some useful patterns, such as - testing functions without a return value that only fail by panicking, - testing functions that return a `Result<(), ...>` that only fail by returning an error.
diff --git a/src/tester.rs b/src/tester.rs index 5ccc625..7ed21fd 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -241,6 +241,12 @@ impl Testable for bool { } } +impl Testable for () { + fn result<G: Gen>(&self, _: &mut G) -> TestResult { + TestResult::passed() + } +} + impl Testable for TestRes...
2
18
0
f6b9b61b24ca0574b12ae8663ae7b73aa59c2860
Eduard Bopp
2015-05-19T10:10:16
Implement Testable for more generic results It is sufficient to constrain the error type to be `Debug + Send + 'static` instead of limiting it to `String` only.
diff --git a/src/tester.rs b/src/tester.rs index 704b89b..5ccc625 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -245,11 +245,11 @@ impl Testable for TestResult { fn result<G: Gen>(&self, _: &mut G) -> TestResult { self.clone() } } -impl<A> Testable for Result<A, String> where A: Testable { +impl<A, E> Testa...
2
14
2
9617bc599ffe04b65319cfc15ca0e667b54dbd7f
Andrew Gallant
2015-05-02T00:24:19
More cleanups.
diff --git a/src/tester.rs b/src/tester.rs index f000166..704b89b 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -72,11 +72,10 @@ impl<G: Gen> QuickCheck<G> { if ntests >= self.tests { break } - let r = f.result(&mut self.gen); - match r.status { - ...
1
22
24
e1be08d13a6d50212ce9a6baedc86cdf51dbf6dd
Andrew Gallant
2015-05-01T23:15:23
Move 'static bound to Testable trait.
diff --git a/src/tester.rs b/src/tester.rs index 62887e0..f000166 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -176,7 +176,7 @@ impl TestResult { /// Tests if a "procedure" fails when executed. The test passes only if /// `f` generates a task failure during its execution. pub fn must_fail<T, F>(f: F...
1
13
13
6c676033e15573081d1e0e0538b9a295004c776c
Andrew Gallant
2015-05-01T23:10:19
Removing unnecessary 'static and simplify safe. It's amazing the cruft that builds up when you keep up with nightlies for a year.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 9247fed..b04e066 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1,7 +1,6 @@ use std::char; use std::collections::hash_map::HashMap; use std::hash::Hash; -use std::mem; use rand::Rng; @@ -48,32 +47,14 @@ impl<R: Rng> Gen for StdGen<R> { fn siz...
2
33
68
43c54e98312e5a6c2665ca53e7ff0a95d07a998d
Andrew Gallant
2015-05-01T22:36:03
Remove TrieMap arbitrary impl. The crate no longer compiles.
diff --git a/Cargo.toml b/Cargo.toml index af7baf5..059e8b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,17 +10,9 @@ readme = "README.md" keywords = ["testing", "quickcheck", "property", "shrinking", "fuzz"] license = "Unlicense/MIT" -[features] -# Includes impls for `Arbitrary` for some data structures in `coll...
3
0
53
c99d617ce8f0a9dc1bcd1056168c50c1c5a334f8
Andrew Gallant
2015-04-26T16:51:01
'fix' tests
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index ae44f14..99accb7 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -708,17 +708,7 @@ mod test { #[test] fn chars() { - eq('a', vec![]); - } - - #[test] - fn strs() { - eq("".to_string(), vec![]); - eq("A".to_string(),...
1
1
11
16f87a591b8a505ff4bcdeb51c66ab628af7eb58
Andrew Gallant
2015-04-26T15:51:27
Implement shrinking for characters. Just ignore invalid characters.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index fc7256e..ae44f14 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1,3 +1,4 @@ +use std::char; use std::collections::hash_map::HashMap; use std::hash::Hash; use std::mem; @@ -349,8 +350,7 @@ impl Arbitrary for char { fn arbitrary<G: Gen>(g: &mut G) -...
1
2
2
603ce2d1da270281d5324c20555af8759ac6458b
Andrew Gallant
2015-04-18T14:49:46
Remove deprecated PhantomFn. This was necessary on 1.0-beta1 but was removed from 1.0-beta2.
diff --git a/src/tester.rs b/src/tester.rs index 5e6603e..733024b 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -289,9 +289,7 @@ impl<A, B, C, D, T,> Testable for fn(A, B, C, D) -> T } } -// `PhantomFn` is deprecated on nightly, but stable on beta. -#[allow(deprecated)] -trait Fun<A, B, C, D, T> : ::std::ma...
1
1
3
a7c4ddb0c856996d742619ceedad48900c535052
Markus Westerlind
2015-04-17T18:54:15
Added lazy shrinking for Vec
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index f4e7f47..fc7256e 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -216,32 +216,92 @@ impl<A: Arbitrary> Arbitrary for Vec<A> { } fn shrink(&self) -> Box<Iterator<Item=Vec<A>>+'static> { - if self.len() == 0 { - return empty_shri...
1
80
46
8a7954ad84242b0d68f4438b432a0450283f8011
Andrew Gallant
2015-04-15T22:57:58
license fix
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 2cf5e77..b99902c 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -8,7 +8,7 @@ homepage = "https://github.com/BurntSushi/quickcheck" repository = "https://github.com/BurntSushi/quickcheck" readme = "../README...
1
1
1
cdf50ebeb532f03e517209778c4292645f2f93b1
Andrew Gallant
2015-04-09T21:45:30
Close #73.
diff --git a/src/tester.rs b/src/tester.rs index ecf3483..5e6603e 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -289,6 +289,8 @@ impl<A, B, C, D, T,> Testable for fn(A, B, C, D) -> T } } +// `PhantomFn` is deprecated on nightly, but stable on beta. +#[allow(deprecated)] trait Fun<A, B, C, D, T> : ::std::ma...
1
2
0
6c327b0be9234492e7607e0c5bc4e75df5cb9c01
Andrew Gallant
2015-04-02T23:59:06
Scratch the `num` crate and just (ab)use macros. It turns out that the `num` crate is very very far from working on Rust stable.
diff --git a/Cargo.toml b/Cargo.toml index 6bfa42e..f8dc2cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ name = "quickcheck" [dependencies] log = "*" -num = "*" rand = "*" [dependencies.collect] diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 7cf0861..f4e7f47 100644 --- a/src/arbitrary.rs +...
3
124
115
dbf2210b7227d34feeab7d7910ab638eedbf6581
Andrew Gallant
2015-04-02T21:33:49
Move to Rust stable. This replaces the generic numeric code with the new `num` crate.
diff --git a/Cargo.toml b/Cargo.toml index ba44747..63e4b15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ name = "quickcheck" [dependencies] log = "*" +num = "*" rand = "*" [dependencies.collect] diff --git a/src/arbitrary.rs b/src/arbitrary.rs index bbe07e9..7cf0861 100644 --- a/src/arbitrary.rs +...
4
20
17
0c32d4a3c08a12d11f47c503c3a982f19f6ae3be
Eduard Bopp
2015-03-29T11:28:29
Fix outdated integer suffixes
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 560532c..bbe07e9 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -628,11 +628,11 @@ mod test { { let mut map = TrieMap::new(); - map.insert(1, 1i); + map.insert(1, 1); let shrinks = vec![ - ...
1
3
3
4dc399c79cf6c6459a819c6b0173ef01be6e63f4
Andrew Gallant
2015-03-26T23:18:12
rustup P.S. You're going to have the bare the trivial cast warnings when running `quickcheck` without the macro. Once type ascription lands, we should be able to fix this.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 5c34ad9..560532c 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -318,6 +318,7 @@ macro_rules! unsigned_arbitrary { $( impl Arbitrary for $ty { fn arbitrary<G: Gen>(g: &mut G) -> $ty { + #![allow(tri...
1
1
0
cb0a2179185ea7f9caca0295e80729a302ce2700
Andrew Paseltiner
2015-03-19T12:33:32
update to Rust master
diff --git a/examples/out_of_bounds.rs b/examples/out_of_bounds.rs index 2240640..a2761e6 100644 --- a/examples/out_of_bounds.rs +++ b/examples/out_of_bounds.rs @@ -1,13 +1,10 @@ -#![feature(core)] - extern crate quickcheck; -use std::iter::range; use quickcheck::{TestResult, quickcheck}; fn main() { fn pro...
2
4
7
53ed49343321bd28b19c4d81eac318ad5111dbcd
Andrew Paseltiner
2015-03-10T17:15:53
s/should_fail/should_panic/
diff --git a/quickcheck_macros/tests/macro.rs b/quickcheck_macros/tests/macro.rs index c7de75c..47259f1 100644 --- a/quickcheck_macros/tests/macro.rs +++ b/quickcheck_macros/tests/macro.rs @@ -17,14 +17,14 @@ fn min(x: isize, y: isize) -> TestResult { } #[quickcheck] -#[should_fail] +#[should_panic] fn fail_fn() -...
2
3
3
7cfeedc5cebbc78727253148714102c90fa0a5e1
Andrew Paseltiner
2015-03-08T17:36:47
re-enable debug info
diff --git a/Cargo.toml b/Cargo.toml index 08ec337..8256c27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,6 @@ collect_impls = ["collect"] [lib] name = "quickcheck" -[profile.test] -debug = false - [dependencies] log = "*" rand = "*"
1
0
3
8f00bcd70aaff7c58197467c41c47056d146dd4b
Andrew Paseltiner
2015-03-08T17:32:58
add `custom_attribute` feature to macro example
diff --git a/quickcheck_macros/examples/attribute.rs b/quickcheck_macros/examples/attribute.rs index 53eb30e..845020c 100644 --- a/quickcheck_macros/examples/attribute.rs +++ b/quickcheck_macros/examples/attribute.rs @@ -1,3 +1,4 @@ +#![feature(custom_attribute)] #![feature(plugin)] #![allow(dead_code)] #![plugin(qu...
1
1
0
5df5fabed2d507bcbd1eb96295eea7670a71fa75
Andrew Gallant
2015-03-07T16:57:37
Remove stdout/stderr capturing in tests. Apparently, thread-local stdout/stderr capturing is going to be removed. This will eventually impact the standard test infrastructure too.
diff --git a/Cargo.toml b/Cargo.toml index 67c07d4..ebe4631 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,9 @@ collect_impls = ["collect"] [lib] name = "quickcheck" +[profile.test] +debug = false + [dependencies] log = "*" rand = "*" diff --git a/src/lib.rs b/src/lib.rs index bcbe598..6002717 100644 --- ...
4
12
33
9e64362f55c0a8cb667cf1a9bf9965f9260826aa
Andrew Paseltiner
2015-02-26T20:55:47
remove unnecessary type hints
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 8907629..c72d3c7 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -127,7 +127,7 @@ impl<A: Arbitrary> Arbitrary for Option<A> { } Some(ref x) => { let chain = single_shrinker(None).chain(x.shrink().map(Some)); - ...
1
5
5
96668ef4aa392af051ee7b1bb7061b3fb533f147
Andrew Paseltiner
2015-02-26T20:53:42
remove `Shrinker` trait closes #55 This is a [breaking-change]. To update your code, change the return type of the `shrink` method in all `Arbitrary` impls from `Box<Shrinker<Self>+'static>` to `Box<Iterator<Item=Self>+'static>` and replace all `Shrinker<A>` impls with an `Iterator<Item=A>` impl.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 0ef93f0..8907629 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -51,29 +51,6 @@ impl<R: Rng> Gen for StdGen<R> { fn size(&self) -> usize { self.size } } -/// `Box<Shrinker>` is an existential type that represents an arbitrary -/// iterator. -/// -/...
3
26
49
77ca819452fd021b70c925d71179341dea459bef
Andrew Gallant
2015-02-21T03:50:19
rustup This entire crate needs to be code reviewed. I've just sprinkled a whole bunch of `'static` bounds everywhere, and I'm not sure if I've accidentally broken things that should work.
diff --git a/examples/out_of_bounds.rs b/examples/out_of_bounds.rs index 77676eb..2240640 100644 --- a/examples/out_of_bounds.rs +++ b/examples/out_of_bounds.rs @@ -8,7 +8,6 @@ use quickcheck::{TestResult, quickcheck}; fn main() { fn prop(length: usize, index: usize) -> TestResult { let v: Vec<_> = range...
4
41
38
8f7a30fbb0680fccb54e273801246e00bbec11db
Andrew Gallant
2015-02-20T21:06:33
Progress on fixing. Changes in 'std::thread' require refactoring code.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 58daab6..5bed49a 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1,5 +1,5 @@ use rand::Rng; -use std::collections::hash_map::{HashMap, self}; +use std::collections::hash_map::HashMap; use std::hash::{Hash, Hasher}; use std::iter::range; use std::mem; @...
2
28
27
6650a1359135a6ced56fa276e38d7e1f68fdd351
Caspar Krieger
2015-02-07T10:05:00
Rely on closure type inference instead of annotation As suggested by compile error.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index f85e0f6..58daab6 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -387,7 +387,7 @@ fn shuffle_vec<A: Clone>(xs: &[A], k: usize) -> Vec<Vec<A>> { return vec![vec![]]; } - let cat = |&mut: x: &Vec<A>| { + let cat = |x: &Ve...
1
1
1
9e1e7a8ebb62f539c270b7ec67689af807dcdc31
Andrew Gallant
2015-02-05T21:58:58
lingering rustup
diff --git a/quickcheck_macros/examples/attribute.rs b/quickcheck_macros/examples/attribute.rs index a6f0de5..89a9509 100644 --- a/quickcheck_macros/examples/attribute.rs +++ b/quickcheck_macros/examples/attribute.rs @@ -1,4 +1,4 @@ -#![feature(plugin)] +#![feature(core, plugin)] #![allow(dead_code)] extern crate q...
1
2
2
e1f48334648707f1901f5537aa39fa5b16017c6e
Andrew Paseltiner
2015-02-05T20:14:44
migrate to `rand` crate
diff --git a/Cargo.toml b/Cargo.toml index d2b13bb..ceed86b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ name = "quickcheck" [dependencies] log = "*" +rand = "*" [dependencies.collect] optional = true diff --git a/src/arbitrary.rs b/src/arbitrary.rs index fb8a60d..f85e0f6 100644 --- a/src/arbitrar...
4
6
4
a0032e962aeb1da3f3536bd1dcee12acac426fe3
Eduard Bopp
2015-02-03T21:22:07
Update to latest nightly
diff --git a/src/lib.rs b/src/lib.rs index 36e1144..c3b5e8b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,7 @@ #![crate_name = "quickcheck"] #![doc(html_root_url = "http://burntsushi.net/rustdoc/quickcheck")] -#![feature(collections, core, io, rand, std_misc)] +#![feature(core, io, rand, std_misc)] #[cfg(f...
2
2
2
ab7e9ac2b3441f8580286b136b9c031f6e20a187
Andrew Gallant
2015-01-30T23:57:36
forgotten rustup
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index b7dd443..038d8ca 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -5,8 +5,7 @@ #![crate_type = "dylib"] #![doc(html_root_url = "http://burntsushi.net/rustdoc/quickcheck")] -#![allow(unstable)] -#![feature(p...
2
3
3
f314b94e1a8b737c541a94390c0f81b2022c7dcc
Andrew Paseltiner
2015-01-28T17:19:32
s/std::io/std::old_io/
diff --git a/src/tester.rs b/src/tester.rs index 894f318..e93afd9 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -1,6 +1,6 @@ use std::sync::mpsc::channel; use std::fmt::Debug; -use std::io::ChanWriter; +use std::old_io::ChanWriter; use std::iter; use std::rand; use std::thread; @@ -416,7 +416,7 @@ mod trap { ...
1
2
2
60754695aa9a944bd73e58752630c2eaaf81a06e
Andrew Gallant
2015-01-25T18:07:15
Fix #58 by using `DefaultReturn` instead of `Return`.
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index fd7d567..b7dd443 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -11,8 +11,10 @@ extern crate syntax; extern crate rustc; +use syntax::abi; use syntax::ast; use syntax::ast::Ty_::TyBareFn; +use syntax::a...
1
22
17
082d5e1314181c13b9ae49120b73dc26f0ba7d69
Andrew Paseltiner
2015-01-23T14:54:58
replace deprecated methods with slicing syntax
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index d90d4b8..fb8a60d 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -381,8 +381,8 @@ fn shuffle_vec<A: Clone>(xs: &[A], k: usize) -> Vec<Vec<A>> { if k > n { return vec![]; } - let xs1: Vec<A> = xs.slice_to(k).iter().map(|...
1
2
2
fa1c6e969965debcd9e2dfbcc199a71e33cd73ea
Andrew Gallant
2015-01-10T04:34:39
Implement the 'collect' feature correctly.
diff --git a/Cargo.toml b/Cargo.toml index 98ed2a2..f7a5458 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,12 +10,16 @@ readme = "README.md" keywords = ["testing", "quickcheck", "property", "shrinking", "fuzz"] license = "Unlicense" +[features] +# Includes impls for `Arbitrary` for some data structures in `collect...
3
12
8
c5bbe6a80d53d469a16fe3988fe651c1b4bddfe6
Andrew Gallant
2015-01-10T00:26:20
Remove uses of as_slice. There should be no warnings now. (unstable warnings are suppressed though.)
diff --git a/examples/out_of_bounds.rs b/examples/out_of_bounds.rs index 8df19fe..d64ef26 100644 --- a/examples/out_of_bounds.rs +++ b/examples/out_of_bounds.rs @@ -1,3 +1,5 @@ +#![allow(unstable)] + extern crate quickcheck; use std::iter::range; diff --git a/examples/reverse.rs b/examples/reverse.rs index 8fb74da....
10
34
31
78d5954803460ea7bbe2bdc68cc9b1558b70ac73
Jorge Aparicio
2015-01-09T13:49:10
update to rust nightly
diff --git a/examples/out_of_bounds.rs b/examples/out_of_bounds.rs index 14808fe..8df19fe 100644 --- a/examples/out_of_bounds.rs +++ b/examples/out_of_bounds.rs @@ -4,7 +4,7 @@ use std::iter::range; use quickcheck::{TestResult, quickcheck}; fn main() { - fn prop(length: uint, index: uint) -> TestResult { + fn...
12
102
96
2c873d61a738826f47ded7c409f75a7603c7ea69
Andrew Gallant
2015-01-08T11:54:30
Revert "Merge pull request #53 from tomjakubowski/rustup" This reverts commit 83ab987f20940a506c2a19e4249aa72dd2fe24f4, reversing changes made to fef2988e29490523a2ef454f2ebefce9f845da37.
diff --git a/src/tester.rs b/src/tester.rs index 6ffbabd..1b17807 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -1,5 +1,5 @@ use std::sync::mpsc::channel; -use std::fmt; +use std::fmt::Show; use std::io::ChanWriter; use std::iter; use std::rand; @@ -185,7 +185,7 @@ impl TestResult { thread::Builder...
1
16
16
aa37b94e4718b3951823c056e99df342d066f8ae
Tom Jakubowski
2015-01-08T07:33:12
Update for rust master (9f1ead8fa)
diff --git a/src/tester.rs b/src/tester.rs index 1b17807..6ffbabd 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -1,5 +1,5 @@ use std::sync::mpsc::channel; -use std::fmt::Show; +use std::fmt; use std::io::ChanWriter; use std::iter; use std::rand; @@ -185,7 +185,7 @@ impl TestResult { thread::Builder...
1
16
16
132ecc52b32b59143b43f058656ed0bdb9ccb926
Andrew Paseltiner
2015-01-07T16:27:24
update to Rust master
diff --git a/quickcheck_macros/examples/attribute.rs b/quickcheck_macros/examples/attribute.rs index 0d2db88..a2de512 100644 --- a/quickcheck_macros/examples/attribute.rs +++ b/quickcheck_macros/examples/attribute.rs @@ -1,8 +1,9 @@ -#![feature(phase)] +#![feature(plugin)] #![allow(dead_code)] extern crate quickche...
3
7
7
dd1e0d34214ca70e207c28133ac4864e834cb060
Rick Richardson
2015-01-06T15:48:06
added dependency on extern crate, log
diff --git a/Cargo.toml b/Cargo.toml index 0efd198..bc077d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,3 +16,6 @@ name = "quickcheck" [dependencies.collect] optional = true version = "*" + +[dependencies] +log = "*"
1
3
0
93d04bb845a352363f4a124760e6833ea49fadb7
Rick Richardson
2015-01-06T15:45:51
updated closure syntax for latest rustup
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 0c2495f..af169a2 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -492,12 +492,12 @@ mod test { #[test] fn arby_int() { - rep(|| { let n: int = arby(); assert!(n >= -5 && n <= 5); } ); + rep(&mut || { let n: int = arby(); assert!(n ...
1
3
3
8032b43d2a2fe4478f49a11614eb39a55aa48c3a
Phil Schaf
2015-01-03T17:54:40
adapted to master changes
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 0e98209..8f9db31 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::hash::Hash; use std::iter::range; use std::mem; -use std::num::{Int, Primitive, SignedInt, UnsignedInt, mod}; +use std::num::{Int, Primi...
2
10
10