1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
//! 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_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,
"logs/skorvald-20200920.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");
test!(test_mai_trin_cm, "logs/cms/mai-trin.zevtc");
test!(test_ankka_cm, "logs/cms/ankka.zevtc");
|