Skip to content

Commit

Permalink
Create A<V> to implement Arbitrary for all underlying storage types.
Browse files Browse the repository at this point in the history
All `quickcheck` tests accept `A<V>` as parameters and `deref` into the
underling storage type. Allows for `quickcheck` tests for types that
don't implement `Arbitrary` by default. Part of #29.
  • Loading branch information
iliekturtles committed Dec 18, 2017
1 parent 2745e3d commit c44441f
Show file tree
Hide file tree
Showing 3 changed files with 228 additions and 172 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
availability of the type as an underlying storage type: `usize`, `u8`, `u16`, `u32`, `u64`,
`isize`, `i8`, `i16`, `i32`, `i64`, `bigint`, `biguint`, `rational`, `rational32`, `rational64`,
`bigrational`, `f32`, and `f64`. For compile time reasons only `f32` and `f64` are enabled by
default.
default. Tests are implemented for all underlying storage types but don't account for minimum or
maximum values and will fail for non-float types where the conversion factor overflows the
type's limits. A future release will correct this.
* [#29](https://github.com/iliekturtles/uom/issues/29) [Breaking] Traits and structs generated by
the `system!` macro have been significantly changed in order to support non-float underlying
storage types.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ clippy = { version = "^0", optional = true }
compiletest_rs = { version = "^0", optional = true }

[dev-dependencies]
quickcheck = "0.4.1"
quickcheck = "0.5.0"
approx = "0.1.1"

[features]
Expand Down
Loading

0 comments on commit c44441f

Please sign in to comment.