aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-05-14 18:00:51 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-05-14 18:00:51 +0200
commit915fbce3156c10b95e47f01babef75885b782857 (patch)
tree99f334f679f427f7c8803dd6a08773c234207b7c /tests
parente215ccbfeedd8a592bfd2c00f4273ab5682fc924 (diff)
downloadevtclib-915fbce3156c10b95e47f01babef75885b782857.tar.gz
evtclib-915fbce3156c10b95e47f01babef75885b782857.tar.bz2
evtclib-915fbce3156c10b95e47f01babef75885b782857.zip
add tests for CM detection
Currently, I seem to not have a Cardinal Sabir CM log though.
Diffstat (limited to 'tests')
-rw-r--r--tests/challenge_motes.rs46
-rw-r--r--tests/logs/cms/adina.zevtcbin0 -> 1685986 bytes
-rw-r--r--tests/logs/cms/ca.zevtcbin0 -> 1809654 bytes
-rw-r--r--tests/logs/cms/cairn.zevtcbin0 -> 816716 bytes
-rw-r--r--tests/logs/cms/deimos.zevtcbin0 -> 2048785 bytes
-rw-r--r--tests/logs/cms/desmina.zevtcbin0 -> 990539 bytes
-rw-r--r--tests/logs/cms/dhuum.zevtcbin0 -> 1460673 bytes
-rw-r--r--tests/logs/cms/largos.zevtcbin0 -> 3621824 bytes
-rw-r--r--tests/logs/cms/mo.zevtcbin0 -> 438742 bytes
-rw-r--r--tests/logs/cms/qadim.zevtcbin0 -> 3640631 bytes
-rw-r--r--tests/logs/cms/qadimp.zevtcbin0 -> 3870022 bytes
-rw-r--r--tests/logs/cms/samarog.zevtcbin0 -> 81149 bytes
12 files changed, 46 insertions, 0 deletions
diff --git a/tests/challenge_motes.rs b/tests/challenge_motes.rs
new file mode 100644
index 0000000..bdf17a3
--- /dev/null
+++ b/tests/challenge_motes.rs
@@ -0,0 +1,46 @@
+//! Tests to ensure that CM detection is working.
+//!
+//! CM logs should be placed in the logs/cms folder, unless they are fights which only exist in the
+//! challenge mote (or mostly exist in CM), like the fractal CM fights.
+
+use std::path::Path;
+
+use evtclib::Compression;
+
+macro_rules! test {
+ ($name:ident, $log:expr) => {
+ #[test]
+ fn $name() {
+ check_cm($log);
+ }
+ };
+}
+
+fn check_cm(path: &str) {
+ let path = Path::new("tests").join(path);
+ let log = evtclib::process_file(&path, Compression::Zip).unwrap();
+ assert!(log.is_cm(), "expected {:?} to be a CM log", path);
+}
+
+test!(test_cairn_cm, "logs/cms/cairn.zevtc");
+test!(test_mo_cm, "logs/cms/mo.zevtc");
+test!(test_samarog_cm, "logs/cms/samarog.zevtc");
+test!(test_deimos_cm, "logs/cms/deimos.zevtc");
+
+test!(test_desmina_cm, "logs/cms/desmina.zevtc");
+test!(test_dhuum_cm, "logs/cms/desmina.zevtc");
+
+test!(test_ca_cm, "logs/cms/ca.zevtc");
+test!(test_largos_cm, "logs/cms/largos.zevtc");
+test!(test_qadim_cm, "logs/cms/qadim.zevtc");
+
+test!(test_adina_cm, "logs/cms/adina.zevtc");
+test!(test_qadimp_cm, "logs/cms/qadimp.zevtc");
+
+test!(test_skorvald_cm, "logs/skorvald-20200427.zevtc");
+test!(test_artsariiv_cm, "logs/artsariiv-20200427.zevtc");
+test!(test_arkk_cm, "logs/arkk-20200427.zevtc");
+
+test!(test_mama_cm, "logs/mama-20200427.zevtc");
+test!(test_siax_cm, "logs/siax-20200427.zevtc");
+test!(test_ensolyss_cm, "logs/ensolyss-20200427.zevtc");
diff --git a/tests/logs/cms/adina.zevtc b/tests/logs/cms/adina.zevtc
new file mode 100644
index 0000000..292c967
--- /dev/null
+++ b/tests/logs/cms/adina.zevtc
Binary files differ
diff --git a/tests/logs/cms/ca.zevtc b/tests/logs/cms/ca.zevtc
new file mode 100644
index 0000000..e221914
--- /dev/null
+++ b/tests/logs/cms/ca.zevtc
Binary files differ
diff --git a/tests/logs/cms/cairn.zevtc b/tests/logs/cms/cairn.zevtc
new file mode 100644
index 0000000..6b223c6
--- /dev/null
+++ b/tests/logs/cms/cairn.zevtc
Binary files differ
diff --git a/tests/logs/cms/deimos.zevtc b/tests/logs/cms/deimos.zevtc
new file mode 100644
index 0000000..8689baa
--- /dev/null
+++ b/tests/logs/cms/deimos.zevtc
Binary files differ
diff --git a/tests/logs/cms/desmina.zevtc b/tests/logs/cms/desmina.zevtc
new file mode 100644
index 0000000..f406b7d
--- /dev/null
+++ b/tests/logs/cms/desmina.zevtc
Binary files differ
diff --git a/tests/logs/cms/dhuum.zevtc b/tests/logs/cms/dhuum.zevtc
new file mode 100644
index 0000000..1b57c84
--- /dev/null
+++ b/tests/logs/cms/dhuum.zevtc
Binary files differ
diff --git a/tests/logs/cms/largos.zevtc b/tests/logs/cms/largos.zevtc
new file mode 100644
index 0000000..7bb39a0
--- /dev/null
+++ b/tests/logs/cms/largos.zevtc
Binary files differ
diff --git a/tests/logs/cms/mo.zevtc b/tests/logs/cms/mo.zevtc
new file mode 100644
index 0000000..25f05ec
--- /dev/null
+++ b/tests/logs/cms/mo.zevtc
Binary files differ
diff --git a/tests/logs/cms/qadim.zevtc b/tests/logs/cms/qadim.zevtc
new file mode 100644
index 0000000..6cb1d0b
--- /dev/null
+++ b/tests/logs/cms/qadim.zevtc
Binary files differ
diff --git a/tests/logs/cms/qadimp.zevtc b/tests/logs/cms/qadimp.zevtc
new file mode 100644
index 0000000..42adcd6
--- /dev/null
+++ b/tests/logs/cms/qadimp.zevtc
Binary files differ
diff --git a/tests/logs/cms/samarog.zevtc b/tests/logs/cms/samarog.zevtc
new file mode 100644
index 0000000..b7dcbc9
--- /dev/null
+++ b/tests/logs/cms/samarog.zevtc
Binary files differ