fix player tests

This commit is contained in:
Joachim Lusiardi 2024-10-24 09:09:29 +02:00
parent 38dc7285c2
commit 8267ad083f
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,7 @@ fn test_get_name() {
gold: 0,
experience: 0,
inventory: vec![],
inventory_slots: 1,
};
assert_eq!(p.get_name(), "Teddy Tester");
}
@ -139,6 +140,7 @@ fn test_change_life() {
gold: 0,
experience: 0,
inventory: vec![],
inventory_slots: 1,
};
assert_eq!(p.get_life(), 5);
p.change_life(-2);
@ -173,6 +175,7 @@ fn test_max_life() {
gold: 0,
experience: 0,
inventory: vec![],
inventory_slots: 1,
};
assert_eq!(p.get_max_life(), 10);
}