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