diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-08-12 12:05:12 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-08-12 12:05:12 +0200 |
commit | 648dce3cfae16253472ed87674de448555ef0a15 (patch) | |
tree | 797f7bbc892ef2ed92e3380951fcda7c6c576b0e /tests/live_comparison.rs | |
parent | 6935a0c82606b95391dfd76c01e393ca99d6bf77 (diff) |
Test cases that do the iron curtain
Diffstat (limited to 'tests/live_comparison.rs')
-rw-r--r-- | tests/live_comparison.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/live_comparison.rs b/tests/live_comparison.rs index ca2ba1b..045414a 100644 --- a/tests/live_comparison.rs +++ b/tests/live_comparison.rs @@ -13,6 +13,17 @@ fn it_successfully_simulates_replay() { test_from_replay(&Path::new("tests/v300_normal_towers")); } +#[test] +fn it_successfully_simulates_replay_with_iron_curtain() { + test_from_replay(&Path::new("tests/v300_iron_curtain")); +} + +#[test] +fn it_successfully_simulates_replay_with_iron_curtain_with_teslas() { + test_from_replay(&Path::new("tests/v300_iron_curtain_with_teslas")); +} + + fn test_from_replay(replay_folder: &Path) { let length = replay_folder.read_dir().unwrap().count()-1; @@ -46,6 +57,8 @@ fn read_player_command(filename: &str) -> Command { let action_type = components.next().unwrap().trim().parse().unwrap(); if action_type == 3 { Command::Deconstruct(point) + } else if action_type == 5 { + Command::IronCurtain } else { Command::Build(point, BuildingType::from_u8(action_type).unwrap()) } |