summaryrefslogtreecommitdiff
path: root/tests/live_comparison.rs
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-07-01 18:06:05 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-07-01 18:06:05 +0200
commit26aefe70fa11f209726e5b8a15bd05303726396e (patch)
treee8ab0ae5fa230e0e1ea6b51b240305d59d59d662 /tests/live_comparison.rs
parent1ac0449bd0313ad01da0d253f7b45b45287314b7 (diff)
Set up (failing) property test for working of new game state
Unfortunately, for this test to work, I still need to implement the function that reads the game state and goes from one to the other.
Diffstat (limited to 'tests/live_comparison.rs')
-rw-r--r--tests/live_comparison.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/live_comparison.rs b/tests/live_comparison.rs
index 20dbb2f..91d3530 100644
--- a/tests/live_comparison.rs
+++ b/tests/live_comparison.rs
@@ -20,12 +20,12 @@ fn it_successfully_simulates_replay_with_teslas() {
}
fn test_from_replay(replay_folder: &str, length: usize) {
- let (settings, mut state) = json::read_state_from_file(&format!("{}/Round 000/state.json", replay_folder)).unwrap();
+ let (settings, mut state) = json::read_expressive_state_from_file(&format!("{}/Round 000/state.json", replay_folder)).unwrap();
for i in 0..length {
let player = read_player_command(&format!("{}/Round {:03}/PlayerCommand.txt", replay_folder, i));
let opponent = read_opponent_command(&format!("{}/Round {:03}/OpponentCommand.txt", replay_folder, i), &settings);
- let (_, mut expected_state) = json::read_state_from_file(&format!("{}/Round {:03}/state.json", replay_folder, i+1)).unwrap();
+ let (_, mut expected_state) = json::read_expressive_state_from_file(&format!("{}/Round {:03}/state.json", replay_folder, i+1)).unwrap();
state.simulate(&settings, player, opponent);
state.sort();