Fixed tests to run again

This commit is contained in:
Beefki 2017-11-02 11:44:41 -05:00
parent 61346fcf10
commit a111ea482b

View File

@ -123,7 +123,7 @@ fn displays() {
#[test] #[test]
fn rolls() { fn rolls() {
let x = Roll::new(20, 6); let x = Roll::new(20, 6);
for y in x.rolls() { for y in x.clone().rolls() {
assert!(y <= x.die()); assert!(y <= x.die());
} }
} }
@ -131,8 +131,10 @@ fn rolls() {
fn totaling() { fn totaling() {
for _ in 0..21 { for _ in 0..21 {
let x = Roll::new(2, 6); let x = Roll::new(2, 6);
assert!(x.total() <= 12 && x.total() >= 2); let y = x.total();
let y = Roll::new(3, 20); assert!(y <= 12 && y >= 2);
assert!(y.total() <= 60 && y.total() >= 3); let z = Roll::new(3, 20);
let y = z.total();
assert!(y <= 60_usize && y >= 3_usize);
} }
} }