From 8267ad083fb3f2be759a629ae95d6f21795ab73e Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Thu, 24 Oct 2024 09:09:29 +0200 Subject: [PATCH] fix player tests --- src/player.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/player.rs b/src/player.rs index e0eb10a..c554f5c 100644 --- a/src/player.rs +++ b/src/player.rs @@ -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); }