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
ba62f1597ea2e335e443ec77b72df5481dc9b8f0
Andrew Gallant
2017-12-30T20:37:07
win: upgrade to winapi 0.3
diff --git a/Cargo.toml b/Cargo.toml index 836dc40..beaee38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,15 @@ readme = "README.md" keywords = ["same", "file", "equal", "inode"] license = "Unlicense/MIT" -[target.'cfg(windows)'.dependencies] -kernel32-sys = "0.2" -winapi = "0.2" +[target.'cfg(windows)'.dep...
3
16
9
e50f5a68d9d8ae1ff19ebd6da321c6411bbd397d
Andrew Gallant
2017-10-21T03:54:03
style: switch from try! to ?
diff --git a/src/lib.rs b/src/lib.rs index 3b2d501..36994b0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -369,7 +369,7 @@ pub fn is_same_file<P, Q>( path1: P, path2: Q, ) -> io::Result<bool> where P: AsRef<Path>, Q: AsRef<Path> { - Ok(try!(Handle::from_path(path1)) == try!(Handle::from_path(path2))) + O...
3
5
5
d01d3a002704c71b85b1526ab4a12210d16bf13a
Andrew Gallant
2017-10-21T02:39:39
formatting
diff --git a/src/lib.rs b/src/lib.rs index 353da4c..3b2d501 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,7 @@ use same_file::is_same_file; # fn try_main() -> Result<(), Box<Error>> { assert!(is_same_file("/bin/sh", "/usr/bin/sh")?); -# Ok(()) +# Ok(()) # } # # fn main() { @@ -46,9 +46,9 @@ for ca...
1
37
36
be98505cde8949963ada85eb8fb08a25a0db773c
Alex Gurganus
2017-10-02T07:38:07
Fix typo 'unqiue' -> 'unique' inode numbers unique
diff --git a/src/win.rs b/src/win.rs index c66ed02..49b9265 100644 --- a/src/win.rs +++ b/src/win.rs @@ -25,7 +25,7 @@ use winapi::winbase::{ // https://msdn.microsoft.com/en-us/library/windows/desktop/aa363788(v=vs.85).aspx // // It gets worse. It appears that the index numbers are not always -// guaranteed to be u...
1
1
1
06f9376b143e238c4c1942dbf25c28240fd238bc
Alex Gurganus
2017-10-02T07:13:17
Fix typo 'checked' -> 'check'
diff --git a/src/lib.rs b/src/lib.rs index 14c6827..353da4c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ assert!(is_same_file("/bin/sh", "/usr/bin/sh")?); Additionally, this crate provides a [`Handle`] type that permits a more efficient equality check depending on your access pattern. For example, if ...
1
1
1
538a80b904105783b74305cb786746e7a4b2e5eb
Ashley Mannix
2017-08-04T09:48:07
add note about handle equality
diff --git a/src/lib.rs b/src/lib.rs index 1edf764..14c6827 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -95,9 +95,13 @@ mod win; /// /// A handle consumes an open file resource as long as it exists. /// +/// Equality is determined by comparing inode numbers on Unix and a combination of +/// identifier, volume serial...
1
4
0
8c09246184b28390a47a5ba8697e7f339031167d
Vsevolod Zubarev
2017-08-02T20:06:02
Note why `Handle` methods in `win` and `unix` won't panic Fixes #7 Fixes #8
diff --git a/src/unix.rs b/src/unix.rs index b2b8c09..b6177b7 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -18,6 +18,8 @@ pub struct Handle { impl Drop for Handle { fn drop(&mut self) { if self.is_std { + // unwrap() will not panic. Since we were able to open an + // std stream suc...
2
20
0
6660cb0f607ebf3f77ade867cfd6aeacd5ecfa4d
gurgalex
2017-08-02T20:09:31
Clarify that "dev" and "ino" are unix only.
diff --git a/src/lib.rs b/src/lib.rs index f429426..1edf764 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -325,12 +325,16 @@ impl Handle { } /// Return the underlying device number of this handle. + /// + /// Note that this only works on unix platforms. #[cfg(any(target_os = "redox", unix))] ...
1
4
0
f6cd7ddb15ed8de91af09453384dfc68c09dab21
Levi Cole
2017-08-02T14:34:26
Adds `html_root` attribute Fixes #12
diff --git a/src/lib.rs b/src/lib.rs index 113cfa5..f429426 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,6 +65,7 @@ See [`examples/is_stderr.rs`] for a runnable example and compare the output of: */ +#![doc(html_root_url = "https://docs.rs/same-file/1.0.0")] #![deny(missing_docs)] #[cfg(windows)]
1
1
0
1238ab7a091ab1004cc1e7445d4e7d1f914063bd
Andy Gauge
2017-07-24T21:20:58
derive Hash on Key.
diff --git a/src/win.rs b/src/win.rs index 3cd468b..731123f 100644 --- a/src/win.rs +++ b/src/win.rs @@ -66,7 +66,7 @@ pub struct Handle { key: Option<Key>, } -#[derive(Debug, Eq, PartialEq)] +#[derive(Debug, Eq, PartialEq, Hash)] struct Key { volume: DWORD, idx_high: DWORD, @@ -106,14 +106,7 @@ impl...
1
2
9
a012a1b9d52db75eed390ed49c39887c2dac1b2a
Andy Gauge
2017-07-24T19:51:11
implement Hash for Handle
diff --git a/src/unix.rs b/src/unix.rs index e479a5f..b2b8c09 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -1,4 +1,5 @@ use std::fs::{File, OpenOptions}; +use std::hash::{Hash, Hasher}; use std::io; use std::os::unix::fs::MetadataExt; use std::os::unix::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd}; @@ -42,6 +43,13 @...
2
22
0
a678a8ff8bf5a3d608e3871cf08884c8e4053122
Vsevolod Zubarev
2017-07-24T20:38:41
Examples and Errors for Handle Fixes #3 Fixes #4
diff --git a/src/lib.rs b/src/lib.rs index 4c7807c..113cfa5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -103,38 +103,222 @@ pub struct Handle(imp::Handle); impl Handle { /// Construct a handle from a path. /// - /// Note that the underlying `File` is opened in read-only mode on all + /// Note that the ...
1
185
1
b8498f48fb4335b84d1d2b2100b4bcc71288cb94
Vsevolod Zubarev
2017-07-24T20:38:41
Add hyperlinks to items in docs prose Fixes #9
diff --git a/src/lib.rs b/src/lib.rs index 51e4244..4c7807c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ This crate provides a safe and simple **cross platform** way to determine whether two file paths refer to the same file or directory. -Most uses of this crate should be limited to the top-level `is_s...
1
11
4
ff28ce6f1822e31266bfef6b32062003680a3f34
Vsevolod Zubarev
2017-07-24T20:25:26
Add Errors Section to `same_file` method Fixes #5
diff --git a/src/lib.rs b/src/lib.rs index 1610eec..9125c00 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -135,12 +135,15 @@ impl Handle { /// Returns true if the two file paths may correspond to the same file. /// -/// If there was a problem accessing either file path, then an error is -/// returned. -/// /// Note ...
1
6
3
21322f60398d538c6c633c4dc771533ae584dc91
Andrew Gauger
2017-07-25T13:12:26
Added tests for Sync and Send Fixes #11
diff --git a/src/lib.rs b/src/lib.rs index 67e9f53..1610eec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -301,4 +301,16 @@ mod tests { soft_link_dir(dir.join("a"), dir.join("alink")).unwrap(); assert!(is_same_file(dir.join("a"), dir.join("alink")).unwrap()); } + + #[test] + fn test_send() { ...
1
12
0
413e46c6bd01c3f643afc3089a94e78e8e8d09e7
Jeremy Soller
2017-01-31T03:40:43
Add redox support
diff --git a/Cargo.toml b/Cargo.toml index c6e6311..fe5e4b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,9 +12,6 @@ readme = "README.md" keywords = ["same", "file", "equal", "inode"] license = "Unlicense/MIT" -[target.'cfg(unix)'.dependencies] -libc = "0.2" - [target.'cfg(windows)'.dependencies] kernel32-sys =...
3
7
14
6ff42899c383e799001921c03160ba7b07fd43d3
Andrew Gallant
2017-01-14T01:00:37
Tweak std handle construction. In my Windows 7 VM, if no pipe is attached to stdout, then getting the file info on the stdout handle returns an ERROR_INVALID_HANDLE. However, on Windows 10, the error returned is "incorrect function." Since the specific error seems to not be stable, we switch to interpreting any error...
diff --git a/src/win.rs b/src/win.rs index fabadb6..0abc480 100644 --- a/src/win.rs +++ b/src/win.rs @@ -14,7 +14,6 @@ use winapi::winbase::{ FILE_FLAG_BACKUP_SEMANTICS, STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE, }; -use winapi::winerror::ERROR_INVALID_HANDLE; // For correctness, it is critica...
1
3
8
bbf6959d054292e9652065cb37f4256eaf990e84
Andrew Gallant
2017-01-09T02:38:28
A couple of fixes. 1. Expose the dev/inode numbers on Unix. This is useful for doing a quick comparison that can lead to a false positive but not a false negative. 2. If the underlying file handle is a "std" (stdin/stdout/stderr) handle, then be careful not to drop it since it will close the stream.
diff --git a/src/lib.rs b/src/lib.rs index da05a86..409edcb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -121,6 +121,18 @@ impl Handle { pub fn as_file_mut(&mut self) -> &mut File { self.0.as_file_mut() } + + /// Return the underlying device number of this handle. + #[cfg(unix)] + pub fn dev(...
3
76
25
eb00091c62db13b350253a5e8109b8667364117a
Josh Stone
2026-04-03T00:52:53
Fix the `gen` deprecation note from `set_rng` to `rng` (#348)
diff --git a/src/tester.rs b/src/tester.rs index 0a45f9e..1655b53 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -84,7 +84,7 @@ impl QuickCheck { /// This is **DEPRECATED**. Using this method on Rust 2024 or newer /// requires the raw identifier syntax because `gen` is now a keyword. /// Instead, pref...
1
1
1
692527d1d9fc9043a70b7d2bf436902e2d0f595b
Andrew Gallant
2026-02-10T18:57:36
quickcheck_macros-1.2.0
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 9c30c88..3c34c75 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "1.1.0" #:version +version = "1.2.0" #:version authors = ["Andrew Gallant <jam...
1
1
1
c69a43c507b9a7f52ef209540d1e504fcc705049
Jakob Schikowski
2021-02-09T01:13:10
api: add Gen::from_size_and_seed The seed still can't be set by QuickCheck users, but the new Gen constructor is useful for other crates that use QuickCheck only for its Arbitrary trait. Closes #277, Closes #278
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 29508b4..2e71569 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -38,7 +38,7 @@ pub struct Gen { } impl Gen { - /// Returns a `Gen` with the given size configuration. + /// Returns a `Gen` with a random seed and the given size configuration. ...
1
16
2
44127d7e27276d1b62d3bb5eebc73216c24efd07
Julian Ganz
2021-06-12T08:24:49
api: add a wrapper for disabling shrinking for an Arbitrary In some cases, users may want to disable shrinking for a specific test. Consider, for example, some complex recursive data type. Naturally, we'd want values to be shrunk for most tests in order to isolate the specific sub-structure provoking the failure. Howe...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 3bca0a7..29508b4 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1209,6 +1209,48 @@ impl Arbitrary for SystemTime { } } +/// Wrapper for disabling shrinking for an Arbitrary +/// +/// This type allows generating values via a given `Arbitrary` imple...
2
45
1
b151ea6f368af0f90150738ffe58e032db57870b
Julian Ganz
2021-06-12T13:31:49
impl: move shrinking logic out of inline function In the past, shrinking was implemented using recursion in the control flow. `shrink_failure` would call itself. That function was introduced originally in 5b19e7c21e1afdcabb894668ad61be70bb023ef0 presumably in order to implement recursive shrinking. However, ...
diff --git a/src/tester.rs b/src/tester.rs index 172d04f..0a45f9e 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -370,12 +370,12 @@ impl<T: Testable, $($name: Arbitrary + Debug),*> Testable for fn($($name),*) -> T { #[allow(non_snake_case)] fn result(&self, g: &mut Gen) -> TestResult { - fn sh...
1
8
18
d61d01c39453e7ace01f825f76829573743de154
Julian Ganz
2021-06-12T11:12:53
impl: do recursive shrinking without recursive fn call We try to shrink values recursively, i.e. when a shrunk value witnesses a failure, we'd shrink that value further. Previously, this recursion would be implemented via actual control flow recursion, i.e. a function calling itself. Since the recursion could not be u...
diff --git a/src/tester.rs b/src/tester.rs index 299366d..172d04f 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -375,7 +375,9 @@ impl<T: Testable, self_: fn($($name),*) -> T, a: ($($name,)*), ) -> Option<TestResult> { - for t in a.shrink() { + let mut r = Def...
1
10
8
23c68eaaedebf19b8c4b7ec1e1e7f03a19327968
Julian Ganz
2021-08-26T15:52:47
impl: make sure a float's shrinker does not yield the original value For floating point values, we use a shrinker for signed integers and convert the output to the float's type. The underlying shrinker is bounded and never includes the original value in the output, i.e. it behaves correctly. However, when converting t...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 1f0f7cf..3bca0a7 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -974,7 +974,8 @@ macro_rules! float_arbitrary { fn shrink(&self) -> Box<dyn Iterator<Item = $t>> { signed_shrinker!($shrinkable); let it = shrink...
1
2
1
89eaaf3eba2b65c405782c7105cdaaf4e00eae6a
Julian Ganz
2021-08-11T18:37:07
impl: simplify control flow in SignedShrinker The condition `(self.x - self.i).abs() < self.x.abs()` is true if `self.i` is not `0` and has the same sign than `self.x`. The latter is always the case due to the initialization, the former was recently introduced to bound the iteration in the case of `self.x == <$ty>::MI...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 652c596..1f0f7cf 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -875,11 +875,7 @@ macro_rules! signed_shrinker { impl Iterator for SignedShrinker { type Item = $ty; fn next(&mut self) -> Option<$ty> { - ...
1
1
5
598decd0bc89a98b1d08949e1227c36a40dc4555
Julian Ganz
2021-08-09T19:55:35
impl: make SignedShrinker bounded for <$ty>::MIN Previously, the `SignedShrinker` was guaranteed to yield a result if initialized with `<$ty>::MIN` (e.g. `i32::MIN` for shrinking `i32` and `f32`). This would result in endless shrinking if a test would happen to fail for these values. Shrinking signed values is done b...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index ba03320..652c596 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -875,7 +875,9 @@ macro_rules! signed_shrinker { impl Iterator for SignedShrinker { type Item = $ty; fn next(&mut self) -> Option<$ty> { - ...
1
3
1
eec60092b5329c827839f45560b35f84e385c3ab
Valerio
2024-09-24T12:32:38
example: call sort function in property test is_sorted Closes #338
diff --git a/examples/sort.rs b/examples/sort.rs index 335f5ce..11f2a6c 100644 --- a/examples/sort.rs +++ b/examples/sort.rs @@ -29,7 +29,7 @@ fn sort<T: Clone + Ord>(list: &[T]) -> Vec<T> { fn main() { fn is_sorted(xs: Vec<isize>) -> bool { - for win in xs.windows(2) { + for win in sort(&xs).wind...
1
1
1
69cab8468a92d6cd008af398748b3a00366dd640
Julian Ganz
2023-12-12T13:18:44
impl: make `Arbitrary::arbitrary` for SystemTime not panic Arbitrary `SystemTime`s are generated based on arbitrary `Duration`s by adding or subtracting from `UNIX_EPOCH`. If we happen to generate big `Duration`s, this could cause an overflow. This change avoids this problem by resorting to ever smaller durations in ...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 746f75f..ba03320 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -5,7 +5,7 @@ use std::collections::{ use std::env; use std::ffi::{CString, OsString}; use std::hash::{BuildHasher, Hash}; -use std::iter::{empty, once}; +use std::iter::{empty, once, succes...
1
11
6
85484841688f1df67ee4f69c58bd57eeb3abb0f8
Martin Garton
2026-02-09T10:15:28
deps: bump rand to 0.10.0 Closes #341
diff --git a/Cargo.toml b/Cargo.toml index 1733aa6..7254f80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,4 +27,4 @@ name = "quickcheck" [dependencies] env_logger = { version = "0.11", default-features = false, optional = true } log = { version = "0.4", optional = true } -rand = { version = "0.9", default-features...
2
2
3
55daa3723e02a327879d9ae306f8a293a6a5bc1c
Andrew Gallant
2026-02-10T18:19:29
api: rename `QuickCheck::set_rng` to `rng` ... and document why `QuickCheck::gen` is now deprecated. The rename is done to be consistent with the rest of the routines on `QuickCheck`.
diff --git a/src/tester.rs b/src/tester.rs index 4b490a6..299366d 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -75,13 +75,18 @@ impl QuickCheck { } /// Set the random number generator to be used by `QuickCheck`. - pub fn set_rng(self, rng: Gen) -> QuickCheck { + pub fn rng(self, rng: Gen) -> Quic...
2
10
11
462a8f4e7888178917793ed336ddb999f2849618
Andrew Gallant
2026-02-10T18:08:47
tester: remove added `PartialEq` impls These were added (without `Eq` impls) to seemingly support a doc test. They are probably fine, but they aren't necessary to support `impl From<bool> for TestResult`. So drop them.
diff --git a/src/tester.rs b/src/tester.rs index f09326c..4b490a6 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -198,7 +198,7 @@ pub fn quickcheck<A: Testable>(f: A) { /// Describes the status of a single instance of a test. /// /// All testable things must be capable of producing a `TestResult`. -#[derive(Clone...
1
12
11
d58e3cffb76fad687318cd1cfc2de165696f6d57
Andrew Gallant
2025-05-05T23:46:34
quickcheck_macros-1.1.0
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index f8495e7..38dd176 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "1.0.0" #:version +version = "1.1.0" #:version authors = ["Andrew Gallant <jam...
1
1
1
826f10baa1f66506b770fed231453266c4bda5b1
Mathspy
2025-03-08T07:09:40
Add shrinking support for arrays (#330)
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 9b2bb61..897641a 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -250,6 +250,20 @@ impl<const N: usize, A: Arbitrary> Arbitrary for [A; N] { fn arbitrary(g: &mut Gen) -> Self { std::array::from_fn(|_ix| A::arbitrary(g)) } + + fn shrink...
1
14
0
9ddbbd6b68ba95d51a05b0665e6b2a179b01a6d2
David Pedersen
2025-03-06T10:12:43
deps: update to syn 2.0 (#317)
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 2cf677c..f8495e7 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -20,7 +20,7 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" quote = "1.0" -syn = { version = "1.0", features = ["full"] } +syn = { ve...
2
9
2
32d7bc4edf71419181649f5ce1c244ae691e4530
Jacob Pratt
2025-03-06T10:08:04
Upgrade to 2021 edition
diff --git a/Cargo.toml b/Cargo.toml index fbc62cc..19596d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["testing", "quickcheck", "property", "shrinking", "fuzz"] categories = ["development-tools::testing"] license = "Unlicense OR MIT" exclude = ["/Makefile", "/ctags.rust", "/session.vim"] ...
3
2
6
44b81bebcf2c815e428e358d3f25486c778746cc
John Vandenberg
2025-03-06T10:05:19
deps: update to env_logger 0.11 (#327)
diff --git a/Cargo.toml b/Cargo.toml index eef7e56..fbc62cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,6 @@ regex = ["env_logger/regex"] name = "quickcheck" [dependencies] -env_logger = { version = "0.8.2", default-features = false, optional = true } +env_logger = { version = "0.11", default-features = f...
1
1
1
d75e67c10c2c7ec308923a6869781d3ce2a4647f
Felipe S. S. Schneider
2021-08-24T19:54:53
Implement the From<bool> trait for TestResult
diff --git a/src/tester.rs b/src/tester.rs index 9fd7a68..45242ee 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -186,7 +186,7 @@ pub fn quickcheck<A: Testable>(f: A) { /// Describes the status of a single instance of a test. /// /// All testable things must be capable of producing a `TestResult`. -#[derive(Clone...
1
17
2
f34179b231002160d41337b20919de1d26ecb539
Felipe S. S. Schneider
2021-08-24T20:13:49
Avoid some warnings from Clippy
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 66a34ea..496cfd9 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -47,7 +47,7 @@ impl Gen { /// randomly generated number. (Unless that number is used to control the /// size of a data structure.) pub fn new(size: usize) -> Gen { - Gen ...
1
15
14
84acaec532a09e5c9661505ab665240c7c2e91be
davidrusu
2025-03-06T09:33:41
only build debug representations of arguments even on failing tests (#304)
diff --git a/src/tester.rs b/src/tester.rs index d9fe7f2..9fd7a68 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -189,7 +189,7 @@ pub fn quickcheck<A: Testable>(f: A) { #[derive(Clone, Debug)] pub struct TestResult { status: Status, - arguments: Vec<String>, + arguments: Option<Vec<String>>, err: O...
1
13
19
2ca27244afaf1bb0f3eb7a3e5f9dca73394daff5
Lynn
2025-03-05T07:53:34
Explain what the crate does in lib.rs docs (#313) Currently https://docs.rs/quickcheck doesn't say much about what this crate does. I think having most info in the README is OK, but probably there should be some info in the crate docs root as well.
diff --git a/src/lib.rs b/src/lib.rs index 58dc99d..d3a5ba4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,11 @@ This crate is a port of [Haskell's QuickCheck](https://hackage.haskell.org/package/QuickCheck). +QuickCheck is a library for random testing of program properties. The +programmer provides a specific...
1
5
0
1cb1a4a8ea871454bd8ad8d772d58e7a26b7662a
Aatif Syed
2025-03-05T07:44:03
feat: support arbitrary arrays (#319)
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index ccc00a2..66a34ea 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -248,6 +248,12 @@ impl_arb_for_tuples! { (H, 7), } +impl<const N: usize, A: Arbitrary> Arbitrary for [A; N] { + fn arbitrary(g: &mut Gen) -> Self { + std::array::from_fn(|_ix...
1
6
0
88f1ecaef26ce2a36b293708210516d371f47927
Julian Ganz
2025-03-05T07:39:03
Shut up non_fmt_panic warning (#284) * Shut up non_fmt_panic warning Like a few other macros, `panic!` accepts a format string and arguments. The format string is meant to be static and calling it with a message string will generate a warning. Currently, the warning also indicates that `rustc` will generate an error ...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 92f893b..ccc00a2 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1365,11 +1365,11 @@ mod test { for n in v { let found = shrunk.iter().any(|&i| i == n); if !found { - panic!(...
2
3
3
32d8b0383b5cedb5e6dd8fd3dd1494f734e49d6e
Jacob Pratt
2021-01-15T12:44:24
impl: eliminate panic on overflowing absolute value Fixes #268 (again)
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 13b5b65..92f893b 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -824,7 +824,9 @@ macro_rules! signed_shrinker { impl Iterator for SignedShrinker { type Item = $ty; fn next(&mut self) -> Option<$ty> { - ...
2
4
2
82373f9ba565160027eafc893e280aa790b500aa
Andrew Gallant
2021-01-11T13:16:22
impl: fix signed shrinker Previously, it was possible for the signed shrinker to call abs on the minimum value of an integer. This is incorrect and can lead to a panic, so we avoid abs in that case. We add a regression test that isn't guaranteed to trip the failure but is highly likely to. Fixes #268
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 0adede5..13b5b65 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -813,7 +813,7 @@ macro_rules! signed_shrinker { } else { let shrinker = SignedShrinker { x: x, i: x / 2 }; let mut items ...
2
11
1
74d0c60b1236ce6199f5bd3fee3534299c302c80
Andrew Gallant
2021-01-08T14:44:20
deps: trim 'rand' dependencies Looks like all we need is 'getrandom' and 'small_rng'. No need for 'std'.
diff --git a/Cargo.toml b/Cargo.toml index 018afe7..5dce141 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,4 +27,4 @@ name = "quickcheck" [dependencies] env_logger = { version = "0.8.2", default-features = false, optional = true } log = { version = "0.4", optional = true } -rand = { version = "0.8", default-feature...
1
1
1
9dfcf7fe27e41f04da3e143a332af41350c564c6
Andrew Gallant
2021-01-08T13:46:14
release: more preparation for 1.0 release This bumps the version numbers.
diff --git a/Cargo.toml b/Cargo.toml index 96ee4e3..018afe7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck" -version = "0.9.2" #:version +version = "1.0.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = "Automatic property based testing with shrinki...
2
3
3
d44b417e11dec5e3c9dd5d10f07e57f569b6b4fa
Andrew Gallant
2020-12-27T21:21:32
style: tweak formatting of top-level comment
diff --git a/src/lib.rs b/src/lib.rs index 4202afb..b9351fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,10 @@ -//! This crate is a port of -//! [Haskell's QuickCheck](https://hackage.haskell.org/package/QuickCheck). -//! -//! For detailed examples, please see the -//! [README](https://github.com/BurntSushi/qui...
1
6
6
467f27287f4bf97aeb1f66b708b59fea45ca37ba
Andrew Gallant
2020-12-27T20:09:23
deps: update env_logger
diff --git a/Cargo.toml b/Cargo.toml index 35d2371..fc35dfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,6 +26,6 @@ regex = ["env_logger/regex"] name = "quickcheck" [dependencies] -env_logger = { version = "0.7.0", default-features = false, optional = true } +env_logger = { version = "0.8.2", default-features = ...
1
1
1
319145dfb9e8e1f2d405276bb88ac03b7f56aca3
Andrew Gallant
2020-12-27T20:08:28
deps: upgrade rand to 0.8 This upgrades to the latest version of rand. Closes #264
diff --git a/Cargo.toml b/Cargo.toml index ddb887b..35d2371 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,5 +28,4 @@ name = "quickcheck" [dependencies] env_logger = { version = "0.7.0", default-features = false, optional = true } log = { version = "0.4", optional = true } -rand = { version = "0.7", features = ["sm...
3
19
23
19f4ba699804d116153ee0fcf7c0da206c40c15a
Thomas
2020-02-06T14:26:59
api: add Arbitrary impl for CString We add a little sophistication here for whether the CString is completely valid UTF-8 or whether it's just an arbitrary mix of bytes. (Excluding NUL of course.) Fixes #165, Closes #257
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index a1db83a..9333f26 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -3,7 +3,7 @@ use std::collections::{ BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList, VecDeque, }; use std::env; -use std::ffi::OsString; +use std::ffi::{CString, OsString}...
2
48
7
71d743a22946136bb163722918dc45e45885baba
Max Blachman
2019-08-19T09:39:58
api: make arbitrary use full number range This commit tweaks the Arbitrary impls of number types (integers, floats) to use the full range with a small bias toward "problem" values. This is a change from prior behavior that would use the `size` parameter to control the range of integers. In retrospect, using the `size...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index e8f0b5f..a1db83a 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -24,16 +24,14 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH}; use rand::seq::SliceRandom; use rand::{self, Rng, RngCore}; -/// `Gen` wraps a `rand::RngCore` with parameters to contro...
2
167
97
d1f80f72390da8d0f86a7dd1ef26028d425f13c8
Andrew Gallant
2020-12-05T17:40:04
api: remove Send bound from Arbitrary/Testable traits The Send bound is a relic from the past. Indeed, the docs for the Arbitrary trait have been outdated for quite some time. quickcheck stopped running each test in a separate thread once `std::panic::catch_unwind` was stabilized many moons ago. With `catch_unwind`, t...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 4693ce8..e8f0b5f 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -142,11 +142,7 @@ pub fn single_shrinker<A: 'static>(value: A) -> Box<dyn Iterator<Item = A>> { /// /// As of now, all types that implement `Arbitrary` must also implement /// `Clone`. (I'm...
2
10
16
4a300c55517c7151b922c606f36eb359e0eee6d7
enterprisey
2020-01-22T11:48:42
doc: document Gen::size PR #255
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 94a81ad..4693ce8 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -30,6 +30,10 @@ use rand::{self, Rng, RngCore}; /// A value with type satisfying the `Gen` trait can be constructed with the /// `gen` function in this crate. pub trait Gen: RngCore { + ...
1
4
0
2164959a8cab4501630c498875df1b083653ab00
Andrew Gallant
2020-01-11T02:27:17
quickcheck_macros-0.9.1
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index e0fcc1a..5a1f47f 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.9.0" #:version +version = "0.9.1" #:version authors = ["Andrew Gallant <jam...
1
1
1
ffc0fec983dcf50bf878c6bd8f1d39dba519f1af
Ingvar Stepanyan
2018-09-20T17:07:43
arbitrary: add impls for Range{To}Inclusive Closes #214
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 08a5ef5..94a81ad 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -13,7 +13,10 @@ use std::num::Wrapping; use std::num::{ NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize, }; -use std::ops::{Bound, Range, RangeFrom, RangeFull, ...
1
28
1
e04889629018d95341b71c696806ab9b27191498
hrls
2019-08-15T14:05:50
arbitrary: add impls for NonZero types Closes #238, Closes #239
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index cdecc42..08a5ef5 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -10,6 +10,9 @@ use std::net::{ IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, }; use std::num::Wrapping; +use std::num::{ + NonZeroU128, NonZeroU16, NonZeroU32, ...
1
79
2
5b532a8bd537e20cfbd03b51c79c6a2860881352
Ryan Lopopolo
2020-01-11T01:22:53
macros: upgrade syn, quote, and proc-macro2 to 1.0 PR #248
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 021bbd5..e0fcc1a 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -17,9 +17,9 @@ path = "src/lib.rs" proc-macro = true [dependencies] -proc-macro2 = "0.4.19" -quote = "0.6.8" -syn = { version = "0.15", feat...
2
10
10
2250c91a13da8e670c4639bf57e042d618346952
Bastien Orivel
2020-01-11T01:22:01
deps: bump to env_logger 0.7 PR #243
diff --git a/Cargo.toml b/Cargo.toml index f9d8f62..fe1adba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ regex = ["env_logger/regex"] name = "quickcheck" [dependencies] -env_logger = { version = "0.6.0", default-features = false, optional = true } +env_logger = { version = "0.7.0", default-features = ...
1
1
1
7845a988894e3e02233bf2115b3d5ce91a914ad9
Andrew Gallant
2019-08-25T14:28:12
release: 0.9.0
diff --git a/Cargo.toml b/Cargo.toml index 2a065e5..f9d8f62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck" -version = "0.8.5" #:version +version = "0.9.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = "Automatic property based testing with shrinki...
2
3
3
2513cdca2d04f4a6dce8197f2a9c1de37b5687b2
Andrew Gallant
2019-08-25T14:26:56
style: move to Rust 2018
diff --git a/Cargo.toml b/Cargo.toml index 32d891c..2a065e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ keywords = ["testing", "quickcheck", "property", "shrinking", "fuzz"] categories = ["development-tools::testing"] license = "Unlicense/MIT" exclude = ["/.travis.yml", "/Makefile", "/ctags.rust", "/s...
4
9
8
37a5a6da297a88d7cf58c0096865e3c818857e4d
Andrew Gallant
2019-08-25T14:25:01
benches: remove benchmark It's broken now because of churn with rand. After spending ten minutes reading rand docs, it's not clear what the right choice is here, and I don't feel like dependending on yet anothe rand crate (rand_hc).
diff --git a/benches/tuples.rs b/benches/tuples.rs deleted file mode 100644 index 74baec5..0000000 --- a/benches/tuples.rs +++ /dev/null @@ -1,85 +0,0 @@ -#![feature(test)] - -extern crate quickcheck; -extern crate rand; -extern crate test; - -use quickcheck::{Arbitrary, StdGen}; -use rand::prng::hc128::Hc128Rng; -use ...
1
0
85
3c4d6764195a09c06f1c4fd5e744e577ae0b15f3
Andrew Gallant
2019-06-09T13:22:40
style: use dyn and inclusive ranges Because the old syntax is now deprecated, and we can afford it given our MSRV.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index a534a96..8c40612 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -104,12 +104,12 @@ impl Gen for StdThreadGen { } /// Creates a shrinker with zero elements. -pub fn empty_shrinker<A: 'static>() -> Box<Iterator<Item=A>> { +pub fn empty_shrinker<A: 'stati...
2
43
43
8b8ee3e9f950444235eacb0ae95e74bf36e7ed2e
Josh Stone
2019-06-09T13:14:42
impl: add Arbitrary impl for Bound<T> And also include an example that uses it. PR #236
diff --git a/examples/btree_set_range.rs b/examples/btree_set_range.rs new file mode 100644 index 0000000..980e935 --- /dev/null +++ b/examples/btree_set_range.rs @@ -0,0 +1,53 @@ +extern crate quickcheck; + +use quickcheck::{quickcheck, TestResult}; +use std::collections::BTreeSet; +use std::ops::Bound::{self, *}; + +...
2
81
1
5c46a0c9f1e7d073496649f88abf5e0410b47345
hcpl
2019-05-13T17:13:41
macros: use $crate prefix This makes possible using the macro as `quickcheck::quickcheck!` without `use quickcheck::quickcheck;` in Rust 2018. PR #235
diff --git a/src/lib.rs b/src/lib.rs index db4bb3b..2fdf4c7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,7 +54,7 @@ macro_rules! quickcheck { } )* } => ( - quickcheck! { + $crate::quickcheck! { @as_items $( #[test]
1
1
1
25609c702de8cacbb9d576fa05800418776b919f
Andrew Gallant
2019-02-12T11:28:26
deps: bump rand_core, rand and env_logger Bumping rand_core would normally, I think, require a corresponding semver bump in quickcheck since it's a public dependency. However, rand_core 0.4 uses the semver trick, so its actually compatible with rand_core 0.3. Fixes #232
diff --git a/Cargo.toml b/Cargo.toml index 8baf90b..7a523b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ regex = ["env_logger/regex"] name = "quickcheck" [dependencies] -env_logger = { version = "0.5", default-features = false, optional = true } +env_logger = { version = "0.6.0", default-features = fa...
1
3
3
b9c9a5065942243f7635290625fafef620c1f704
Jim Turner
2019-02-03T13:05:45
arbitrary: impl for Wrapping<T> PR #230
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 5701a68..07b96f1 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -14,6 +14,7 @@ use std::net::{ IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, }; +use std::num::Wrapping; use std::ops::{Range, RangeFrom, RangeTo, RangeFull};...
1
18
0
2282d4bdaf695320e6d6b5a1edf80641c6072938
Evgeny Kurnevsky
2019-01-09T19:06:34
arbitrary: simplify macros for tuple implementation
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 586ae5c..5701a68 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -195,7 +195,7 @@ impl<A: Arbitrary, B: Arbitrary> Arbitrary for Result<A, B> { } macro_rules! impl_arb_for_single_tuple { - ($(($type_param:ident, $tuple_index:tt, $cloned_for_index:ide...
1
23
70
55307ecbd60675483d61604ccba5be7907fd5033
Andrew Gallant
2019-01-05T15:23:03
release: 0.8.0 of quickcheck and quickcheck_macros
diff --git a/Cargo.toml b/Cargo.toml index c1058e1..2020df2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck" -version = "0.7.2" #:version +version = "0.8.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = "Automatic property based testing with shrinki...
2
3
3
0a0e11ce7c1aa4bf4a3735e67daa6adbe276b608
Andrew Gallant
2019-01-05T15:21:21
arbitrary: SystemTime is stable
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 907b110..586ae5c 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -17,7 +17,7 @@ use std::net::{ use std::ops::{Range, RangeFrom, RangeTo, RangeFull}; use std::path::PathBuf; use std::sync::Arc; -use std::time::Duration; +use std::time::{UNIX_EPOCH, Durat...
1
18
24
d3aa0d39974926361dcce1b5f2abf411738d1497
Andrew Gallant
2019-01-05T14:28:00
deps: update to rand 0.6 and rand_core 0.3 Since this bumps the version of a public dependency, this is also a breaking change for quickcheck.
diff --git a/Cargo.toml b/Cargo.toml index f42d3a5..c1058e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,5 +27,5 @@ name = "quickcheck" [dependencies] env_logger = { version = "0.5", default-features = false, optional = true } log = { version = "0.4", optional = true } -rand = "0.5" -rand_core = "0.2.1" +rand = "...
3
10
9
3c16d5bb78466d1b7527d315fba010f7e76f6174
Igor Gnatenko
2018-10-30T13:31:38
ci: exclude CI files PR #217
diff --git a/Cargo.toml b/Cargo.toml index b709419..dbe88fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ readme = "README.md" keywords = ["testing", "quickcheck", "property", "shrinking", "fuzz"] categories = ["development-tools::testing"] license = "Unlicense/MIT" +exclude = ["/.travis.yml", "/Makefil...
1
1
0
4986e26c773503a9147256afb1c735bb3980e3ff
Andrew Gallant
2018-08-25T13:32:15
quickcheck_macros-0.7.0
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index d647ac6..15b9436 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.6.2" #:version +version = "0.7.0" #:version authors = ["Andrew Gallant <jam...
1
1
1
239b217fedc649bf45de866aad51791d754b01bd
Andrew Gallant
2018-08-25T13:31:29
macros: update Cargo.toml This brings it up to date with warnings from Rust 2018 and bumps the version of the quickcheck dependency.
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 5d4de85..d647ac6 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -9,16 +9,13 @@ repository = "https://github.com/BurntSushi/quickcheck" readme = "../README.md" keywords = ["testing", "quickcheck", "property"...
1
2
5
722e245719cbd6d6ba8481a7da6e53474c8e1f77
Andrew Gallant
2018-08-25T13:27:46
quickcheck: s/connect/join
diff --git a/src/tester.rs b/src/tester.rs index 7cb0961..8369dd7 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -270,12 +270,12 @@ impl TestResult { match self.err { None => { format!("[quickcheck] TEST FAILED. Arguments: ({})", - self.arguments.connect(...
1
2
2
44e11d748b7d3d01083e7471a749dae0836db9ea
Andrew Gallant
2018-08-25T13:24:00
quickcheck: remove global use of allow(deprecated) Instead, fix one of the warnings and continue the use of home_dir.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 8845aa9..a47c501 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -543,6 +543,7 @@ impl Arbitrary for PathBuf { let here = env::current_dir() .unwrap_or(PathBuf::from("/test/directory")); let temp = env::temp_dir(); + #[...
3
9
7
1168b9d304577b4e189825f2f4a20d38baca3118
Andrew Gallant
2018-08-25T13:23:39
rand: remove rand as public dep, use rand_core instead We still choose not to re-export the whole crate, but do re-export the RngCore trait. If the lack of re-exporting proves to be problematic, we can revisit it. Fixes #204
diff --git a/Cargo.toml b/Cargo.toml index aaf09e5..b2c7eb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,3 +25,4 @@ name = "quickcheck" env_logger = { version = "0.5", default-features = false, optional = true } log = { version = "0.4", optional = true } rand = "0.5" +rand_core = "0.2.1" diff --git a/src/arbitrar...
4
51
17
6b47881378ec70d2e87e2dc73516380f33ac6e14
Colin Benner
2018-08-25T11:13:55
fix nightly, rename codemap to source_map
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index abf06e4..0efdb18 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -12,7 +12,7 @@ extern crate rustc_plugin; use syntax::ast; use syntax::ast::{Ident, ItemKind, PatKind, StmtKind, Stmt, TyKind}; -use syntax:...
1
3
3
e7a96bda6766c4f55189163195c24f87866467cb
Ossi Herrala
2018-08-16T12:06:20
Switch RNG from Isaac to Hc128 for benchmarks
diff --git a/benches/tuples.rs b/benches/tuples.rs index a710279..74baec5 100644 --- a/benches/tuples.rs +++ b/benches/tuples.rs @@ -5,7 +5,8 @@ extern crate rand; extern crate test; use quickcheck::{Arbitrary, StdGen}; -use rand::isaac::IsaacRng; +use rand::prng::hc128::Hc128Rng; +use rand::SeedableRng; use test:...
1
3
2
4840705bc6c61fbb98366a81b3a50136f2429f9c
Andrew Gallant
2018-06-25T15:19:14
quickcheck_macros-0.6.2
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index e9f23d7..5d4de85 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.6.1" #:version +version = "0.6.2" #:version authors = ["Andrew Gallant <jam...
1
1
1
af88f0eece0e5f6c046ce666804f1b289d90103c
Pascal Seitz
2018-06-25T14:45:34
fix nightly, match header in ItemKind::Fn
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index 64a38e4..abf06e4 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -53,11 +53,11 @@ fn expand_meta_quickcheck(cx: &mut ExtCtxt, annot_item: Annotatable) -> Annotatable { let item ...
1
3
3
9d3c5de7958cbdb13af650241ec262a7f1bb2bd7
Lucas Salibian
2018-01-31T16:42:17
gen: permit any Gen This commit permits the creation of a QuickCheck with any Gen. We also modify the `gen` method to actually be generic, instead of using a fixed type parameter.
diff --git a/src/tester.rs b/src/tester.rs index 6d4127b..b19a121 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -59,17 +59,9 @@ impl QuickCheck<StdGen<rand::ThreadRng>> { /// the max number of overall tests is set to `10000` and the generator /// is set to a `StdGen` with a default size of `100`. pub...
1
31
13
dee306fd8399744b3a1f9b56a6a4978d680c59d1
Andrew Gallant
2017-12-30T14:53:12
quickcheck_macros-0.6.1
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 6274502..e9f23d7 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.6.0" #:version +version = "0.6.1" #:version authors = ["Andrew Gallant <jam...
1
1
1
1ef6705376bd6499c16f3eb6fc49e9e01f0e3324
Andrew Gallant
2017-12-30T14:52:37
quickcheck_macros: bump quickcheck version
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 245a45f..6274502 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -21,4 +21,4 @@ path = "examples/attribute.rs" [dependencies.quickcheck] path = ".." -version = "0.5" +version = "0.6"
1
1
1
b616faf86f20c490542654f9a7b32bf7199357b0
Andrew Gallant
2017-12-30T14:27:05
quickcheck_macros-0.6.0
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index b72f0ad..245a45f 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.5.1" #:version +version = "0.6.0" #:version authors = ["Andrew Gallant <jam...
1
1
1
fd51e0173069cc073143bacee15163c27b939515
Andrew Gallant
2017-12-30T13:55:25
quickcheck_macros-0.5.1
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 067d5df..b72f0ad 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.5.0" #:version +version = "0.5.1" #:version authors = ["Andrew Gallant <jam...
1
1
1
093ad4abee5737fd60ebd57bf5008d486844818b
Michael Rosenberg
2017-12-29T21:46:18
Fix broken build of quickcheck_macros (#198) Updated members to BareFnTy in quickcheck_macros
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index a39eae0..64a38e4 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -58,7 +58,7 @@ fn expand_meta_quickcheck(cx: &mut ExtCtxt, let prop_ty = cx.ty(span, TyKind::BareFn(P(ast::BareFnTy { ...
1
1
1
085bd2212df1da33be2a9f1fb88d558e9c066d3b
debris
2017-12-29T13:51:10
Update rand to version 0.4
diff --git a/Cargo.toml b/Cargo.toml index d41f302..1bde186 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,4 +22,4 @@ name = "quickcheck" [dependencies] env_logger = { version = "0.4", optional = true } log = { version = "0.3", optional = true } -rand = "0.3" +rand = "0.4"
1
1
1
bfda9ac6657d177473231abd0b1025344f1ec29d
Andrew Gallant
2017-11-28T21:19:58
quickcheck_macros-0.5.0
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 1737ce7..067d5df 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.4.2" #:version +version = "0.5.0" #:version authors = ["Andrew Gallant <jam...
1
1
1
92afe4e90116607e3c640b52e0710871f0dad497
Andrew Gallant
2017-11-28T21:19:53
quickcheck_macros: bump quickcheck dep
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 53ee119..1737ce7 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -21,4 +21,4 @@ path = "examples/attribute.rs" [dependencies.quickcheck] path = ".." -version = "0.4" +version = "0.5"
1
1
1
4eace45b1a56c6d5951b67e9ecf14f9a85880aca
Andrew Gallant
2017-11-28T21:08:22
switch usize to u64 in some places Fixes #182
diff --git a/src/tester.rs b/src/tester.rs index 33bc621..6d4127b 100644 --- a/src/tester.rs +++ b/src/tester.rs @@ -10,13 +10,13 @@ use {Arbitrary, Gen, StdGen}; /// The main QuickCheck type for setting configuration and running QuickCheck. pub struct QuickCheck<G> { - tests: usize, - max_tests: usize, - ...
1
11
11
a1658ce9fc9ab41fd3aa1faeaa326fcf28dfcd45
hcpl
2017-10-31T19:40:52
Rewrite `impl Arbitrary for tuples` macros This implementation relies less on cloning while shrinking, which is a performance boost, evident from benchmarks.
diff --git a/benches/tuples.rs b/benches/tuples.rs new file mode 100644 index 0000000..eb20c34 --- /dev/null +++ b/benches/tuples.rs @@ -0,0 +1,84 @@ +#![feature(test)] + +extern crate quickcheck; +extern crate rand; +extern crate test; + +use quickcheck::{Arbitrary, StdGen}; +use rand::isaac::IsaacRng; +use test::Benc...
2
172
33
b5ce841a2c38f7db042c64577eb01b45b6a3ca1c
Julian Squires
2017-10-24T01:07:46
Take type bounds into account in integer Arbitrary Previously, certain generator sizes would wrap, calling gen_range with invalid ranges, causing assertion errors. This is a little tricky because isize::min_value().abs() overflows. Fixes #143.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index a2775aa..2dc0492 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -569,16 +569,14 @@ macro_rules! unsigned_shrinker { } macro_rules! unsigned_arbitrary { - ($($ty:ty),*) => { + ($($ty:tt),*) => { $( impl Arbitrary for $ty { ...
2
23
10
02e24a9e88ac30f3068dec3c3e03631c3ac29cb0
Bekh-Ivanov Aleksey
2017-09-20T10:44:05
Test float shrinking (#181) Add floating point shrinking tests
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 6c72b23..a2775aa 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -936,6 +936,45 @@ mod test { eq(0u64, vec![]); } + + macro_rules! define_float_eq { + ($ty:ty) => { + fn eq(s:$ty, v: Vec<$ty> ) { + let shr...
1
39
0
80fd254cf61a64fbe229b6973e4d327df9fb6180
Zetok Zalbavar
2017-09-17T07:12:18
Add Arbitrary impls for IpAddr, Ipv{4,6}Addr, SocketAddr, SocketAddrV{4,6}
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index e23e0e8..6c72b23 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -10,6 +10,14 @@ use std::collections::{ }; use std::hash::{BuildHasher, Hash}; use std::iter::{empty, once}; +use std::net::{ + IpAddr, + Ipv4Addr, + Ipv6Addr, + SocketAddr, + ...
1
51
0
b3594233dae4c03512b47e8a16063e6d7fb2567f
Nathaniel Ringo
2017-05-18T06:43:12
Adds Arbitrary implementation for Arc<Arbitrary>
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 8fc05ab..e23e0e8 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -11,6 +11,7 @@ use std::collections::{ use std::hash::{BuildHasher, Hash}; use std::iter::{empty, once}; use std::ops::{Range, RangeFrom, RangeTo, RangeFull}; +use std::sync::Arc; use std:...
1
11
0
faa786914296bcb780f41a0133c1bfef5162f49a
J David Smith
2017-03-29T16:50:43
Added Arbitrary for non-default Hashers This affects HashMap/HashSet. In particular, it allows using Arbitrary HashMaps/HashSets if you use a non-standard hasher such as `fnv`. The tests verify that the "normal" way of defining a `HashMap` input to quickcheck still works, and that substituting the default with a custo...
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 43ea550..8fc05ab 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -8,7 +8,7 @@ use std::collections::{ LinkedList, VecDeque, }; -use std::hash::Hash; +use std::hash::{BuildHasher, Hash}; use std::iter::{empty, once}; use std::ops::{Range, RangeF...
2
29
9
b12cabe04a664932fec92fe060261f2c8ed36411
Andrew Gallant
2017-03-18T13:53:59
quickcheck_macros-0.4.2
diff --git a/quickcheck_macros/Cargo.toml b/quickcheck_macros/Cargo.toml index 1ddc77a..53ee119 100644 --- a/quickcheck_macros/Cargo.toml +++ b/quickcheck_macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quickcheck_macros" -version = "0.4.1" #:version +version = "0.4.2" #:version authors = ["Andrew Gallant <jam...
1
1
1
d9dd0bf3072b979bff145001226196b5b104f8ec
M Farkas-Dyck
2017-03-12T22:33:23
unbreak attribute for functions with pattern parametres
diff --git a/quickcheck_macros/src/lib.rs b/quickcheck_macros/src/lib.rs index 43e6b5b..a39eae0 100644 --- a/quickcheck_macros/src/lib.rs +++ b/quickcheck_macros/src/lib.rs @@ -11,7 +11,7 @@ extern crate syntax; extern crate rustc_plugin; use syntax::ast; -use syntax::ast::{Ident, ItemKind, StmtKind, Stmt, TyKind};...
1
10
2
8dada154cdf1bbc4f264bcbbd07e8201dd0c895c
Igor Gnatenko
2017-02-25T18:57:13
Cargo.toml: bump env_logger to 0.4 Closes: #158
diff --git a/Cargo.toml b/Cargo.toml index e2dc910..683e6d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,6 @@ default = ["use_logging"] name = "quickcheck" [dependencies] -env_logger = { version = "0.3", optional = true } +env_logger = { version = "0.4", optional = true } log = { version = "0.3", optional...
1
1
1