aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/analyzers.rs22
-rw-r--r--tests/challenge_motes.rs2
-rw-r--r--tests/logs/ai-20200922.zevtcbin0 -> 528291 bytes
-rwxr-xr-xtests/logs/analyzers/ai-failed-20200922.zevtcbin0 -> 796353 bytes
-rw-r--r--tests/parsing.rs17
5 files changed, 40 insertions, 1 deletions
diff --git a/tests/analyzers.rs b/tests/analyzers.rs
index c7ed6bd..838e500 100644
--- a/tests/analyzers.rs
+++ b/tests/analyzers.rs
@@ -29,3 +29,25 @@ fn test_xera_succeeded() {
assert_eq!(analyzer.outcome(), Some(Outcome::Success));
}
+
+#[test]
+fn test_ai_failed() {
+ let log = evtclib::process_file(
+ "tests/logs/analyzers/ai-failed-20200922.zevtc",
+ Compression::Zip,
+ )
+ .unwrap();
+
+ let analyzer = log.analyzer().expect("No analyzer for Ai!");
+
+ assert_eq!(analyzer.outcome(), Some(Outcome::Failure));
+}
+
+#[test]
+fn test_ai_succeeded() {
+ let log = evtclib::process_file("tests/logs/ai-20200922.zevtc", Compression::Zip).unwrap();
+
+ let analyzer = log.analyzer().expect("No analyzer for Ai!");
+
+ assert_eq!(analyzer.outcome(), Some(Outcome::Success));
+}
diff --git a/tests/challenge_motes.rs b/tests/challenge_motes.rs
index ff5b21d..151beda 100644
--- a/tests/challenge_motes.rs
+++ b/tests/challenge_motes.rs
@@ -38,6 +38,8 @@ test!(test_adina_cm, "logs/cms/adina.zevtc");
test!(test_sabir_cm, "logs/cms/sabir.zevtc");
test!(test_qadimp_cm, "logs/cms/qadimp.zevtc");
+test!(test_ai_cm, "logs/ai-20200922.zevtc");
+
test!(test_skorvald_cm, "logs/skorvald-20200427.zevtc");
test!(
test_skorvald_cm_post_sunqua_patch,
diff --git a/tests/logs/ai-20200922.zevtc b/tests/logs/ai-20200922.zevtc
new file mode 100644
index 0000000..33f4b11
--- /dev/null
+++ b/tests/logs/ai-20200922.zevtc
Binary files differ
diff --git a/tests/logs/analyzers/ai-failed-20200922.zevtc b/tests/logs/analyzers/ai-failed-20200922.zevtc
new file mode 100755
index 0000000..56d2632
--- /dev/null
+++ b/tests/logs/analyzers/ai-failed-20200922.zevtc
Binary files differ
diff --git a/tests/parsing.rs b/tests/parsing.rs
index 324d823..5da7a1a 100644
--- a/tests/parsing.rs
+++ b/tests/parsing.rs
@@ -396,6 +396,21 @@ test! {
// 100 CM tests
test! {
+ name: parse_ai,
+ log: "logs/ai-20200922.zevtc",
+ boss: Boss::Ai,
+ players: &[
+ (0, ":Dunje.4863", "Padme Amidada", Guardian, Some(Firebrand)),
+ (0, ":Speeaaakmaan.8974", "Damage Modifiers", Guardian, Some(Firebrand)),
+ (0, ":Gellalli.6580", "Germi Burns", Guardian, Some(Firebrand)),
+ (0, ":tokageroh.7521", "Jason Redwood", Revenant, Some(Renegade)),
+ (0, ":xyoz.6710", "Xaphnira", Guardian, Some(Firebrand)),
+ ],
+}
+
+// 99 CM tests
+
+test! {
name: parse_skorvald,
log: "logs/skorvald-20200427.zevtc",
boss: Boss::Skorvald,
@@ -434,7 +449,7 @@ test! {
],
}
-// 99 CM tests
+// 98 CM tests
test! {
name: parse_mama,