From 2f225ba3d27351812307e0a426096738384b7b0d Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 20 Apr 2022 20:25:34 +0200 Subject: add tests for Mai Trin CM --- tests/analyzers.rs | 18 ++++++++++++++++++ tests/challenge_motes.rs | 2 ++ tests/logs/cms/mai-trin-failed.zevtc | Bin 0 -> 1148364 bytes tests/logs/cms/mai-trin.zevtc | Bin 0 -> 2589718 bytes 4 files changed, 20 insertions(+) create mode 100644 tests/logs/cms/mai-trin-failed.zevtc create mode 100644 tests/logs/cms/mai-trin.zevtc (limited to 'tests') diff --git a/tests/analyzers.rs b/tests/analyzers.rs index 838e500..dc876d6 100644 --- a/tests/analyzers.rs +++ b/tests/analyzers.rs @@ -51,3 +51,21 @@ fn test_ai_succeeded() { assert_eq!(analyzer.outcome(), Some(Outcome::Success)); } + +#[test] +fn test_mai_cm_succeeded() { + let log = evtclib::process_file("tests/logs/cms/mai-trin.zevtc", Compression::Zip).unwrap(); + + let analyzer = log.analyzer().expect("No analyzer for Mai Trin"); + + assert_eq!(analyzer.outcome(), Some(Outcome::Success)); +} + +#[test] +fn test_mai_cm_failed() { + let log = evtclib::process_file("tests/logs/cms/mai-trin-failed.zevtc", Compression::Zip).unwrap(); + + let analyzer = log.analyzer().expect("No analyzer for Mai Trin"); + + assert_eq!(analyzer.outcome(), Some(Outcome::Failure)); +} diff --git a/tests/challenge_motes.rs b/tests/challenge_motes.rs index 151beda..3d66b55 100644 --- a/tests/challenge_motes.rs +++ b/tests/challenge_motes.rs @@ -51,3 +51,5 @@ 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"); diff --git a/tests/logs/cms/mai-trin-failed.zevtc b/tests/logs/cms/mai-trin-failed.zevtc new file mode 100644 index 0000000..a5fff5c Binary files /dev/null and b/tests/logs/cms/mai-trin-failed.zevtc differ diff --git a/tests/logs/cms/mai-trin.zevtc b/tests/logs/cms/mai-trin.zevtc new file mode 100644 index 0000000..d3492d1 Binary files /dev/null and b/tests/logs/cms/mai-trin.zevtc differ -- cgit v1.2.3