fix player tests
This commit is contained in:
parent
38dc7285c2
commit
8267ad083f
|
@ -115,6 +115,7 @@ fn test_get_name() {
|
||||||
gold: 0,
|
gold: 0,
|
||||||
experience: 0,
|
experience: 0,
|
||||||
inventory: vec![],
|
inventory: vec![],
|
||||||
|
inventory_slots: 1,
|
||||||
};
|
};
|
||||||
assert_eq!(p.get_name(), "Teddy Tester");
|
assert_eq!(p.get_name(), "Teddy Tester");
|
||||||
}
|
}
|
||||||
|
@ -139,6 +140,7 @@ fn test_change_life() {
|
||||||
gold: 0,
|
gold: 0,
|
||||||
experience: 0,
|
experience: 0,
|
||||||
inventory: vec![],
|
inventory: vec![],
|
||||||
|
inventory_slots: 1,
|
||||||
};
|
};
|
||||||
assert_eq!(p.get_life(), 5);
|
assert_eq!(p.get_life(), 5);
|
||||||
p.change_life(-2);
|
p.change_life(-2);
|
||||||
|
@ -173,6 +175,7 @@ fn test_max_life() {
|
||||||
gold: 0,
|
gold: 0,
|
||||||
experience: 0,
|
experience: 0,
|
||||||
inventory: vec![],
|
inventory: vec![],
|
||||||
|
inventory_slots: 1,
|
||||||
};
|
};
|
||||||
assert_eq!(p.get_max_life(), 10);
|
assert_eq!(p.get_max_life(), 10);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue