From 915fbce3156c10b95e47f01babef75885b782857 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Thu, 14 May 2020 18:00:51 +0200 Subject: add tests for CM detection Currently, I seem to not have a Cardinal Sabir CM log though. --- tests/challenge_motes.rs | 46 +++++++++++++++++++++++++++++++++++++++++++ tests/logs/cms/adina.zevtc | Bin 0 -> 1685986 bytes tests/logs/cms/ca.zevtc | Bin 0 -> 1809654 bytes tests/logs/cms/cairn.zevtc | Bin 0 -> 816716 bytes tests/logs/cms/deimos.zevtc | Bin 0 -> 2048785 bytes tests/logs/cms/desmina.zevtc | Bin 0 -> 990539 bytes tests/logs/cms/dhuum.zevtc | Bin 0 -> 1460673 bytes tests/logs/cms/largos.zevtc | Bin 0 -> 3621824 bytes tests/logs/cms/mo.zevtc | Bin 0 -> 438742 bytes tests/logs/cms/qadim.zevtc | Bin 0 -> 3640631 bytes tests/logs/cms/qadimp.zevtc | Bin 0 -> 3870022 bytes tests/logs/cms/samarog.zevtc | Bin 0 -> 81149 bytes 12 files changed, 46 insertions(+) create mode 100644 tests/challenge_motes.rs create mode 100644 tests/logs/cms/adina.zevtc create mode 100644 tests/logs/cms/ca.zevtc create mode 100644 tests/logs/cms/cairn.zevtc create mode 100644 tests/logs/cms/deimos.zevtc create mode 100644 tests/logs/cms/desmina.zevtc create mode 100644 tests/logs/cms/dhuum.zevtc create mode 100644 tests/logs/cms/largos.zevtc create mode 100644 tests/logs/cms/mo.zevtc create mode 100644 tests/logs/cms/qadim.zevtc create mode 100644 tests/logs/cms/qadimp.zevtc create mode 100644 tests/logs/cms/samarog.zevtc (limited to 'tests') 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 Binary files /dev/null and b/tests/logs/cms/adina.zevtc differ diff --git a/tests/logs/cms/ca.zevtc b/tests/logs/cms/ca.zevtc new file mode 100644 index 0000000..e221914 Binary files /dev/null and b/tests/logs/cms/ca.zevtc differ diff --git a/tests/logs/cms/cairn.zevtc b/tests/logs/cms/cairn.zevtc new file mode 100644 index 0000000..6b223c6 Binary files /dev/null and b/tests/logs/cms/cairn.zevtc differ diff --git a/tests/logs/cms/deimos.zevtc b/tests/logs/cms/deimos.zevtc new file mode 100644 index 0000000..8689baa Binary files /dev/null and b/tests/logs/cms/deimos.zevtc differ diff --git a/tests/logs/cms/desmina.zevtc b/tests/logs/cms/desmina.zevtc new file mode 100644 index 0000000..f406b7d Binary files /dev/null and b/tests/logs/cms/desmina.zevtc differ diff --git a/tests/logs/cms/dhuum.zevtc b/tests/logs/cms/dhuum.zevtc new file mode 100644 index 0000000..1b57c84 Binary files /dev/null and b/tests/logs/cms/dhuum.zevtc differ diff --git a/tests/logs/cms/largos.zevtc b/tests/logs/cms/largos.zevtc new file mode 100644 index 0000000..7bb39a0 Binary files /dev/null and b/tests/logs/cms/largos.zevtc differ diff --git a/tests/logs/cms/mo.zevtc b/tests/logs/cms/mo.zevtc new file mode 100644 index 0000000..25f05ec Binary files /dev/null and b/tests/logs/cms/mo.zevtc differ diff --git a/tests/logs/cms/qadim.zevtc b/tests/logs/cms/qadim.zevtc new file mode 100644 index 0000000..6cb1d0b Binary files /dev/null and b/tests/logs/cms/qadim.zevtc differ diff --git a/tests/logs/cms/qadimp.zevtc b/tests/logs/cms/qadimp.zevtc new file mode 100644 index 0000000..42adcd6 Binary files /dev/null and b/tests/logs/cms/qadimp.zevtc differ diff --git a/tests/logs/cms/samarog.zevtc b/tests/logs/cms/samarog.zevtc new file mode 100644 index 0000000..b7dcbc9 Binary files /dev/null and b/tests/logs/cms/samarog.zevtc differ -- cgit v1.2.3