Fixed tests to run again
This commit is contained in:
parent
61346fcf10
commit
a111ea482b
10
src/roll.rs
10
src/roll.rs
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user