From 0aee5f34c9f384656740666c6fdc03ccf537d2a3 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 13 Nov 2021 11:55:30 +0100 Subject: Add a "is_generic" to detect WvW logs The wording on the evtc README is > an npcid of 1 indicates log is generic - triggers by squadmember > entering combat and not as a result of a boss species id. It is not quite clear whether "generic" implies WvW or if there are PvE generic logs as well if you manage to set up arcdps in the right way. Therefore, the wording in evtclib is rather unspecific as well. --- tests/logs/wvw-20211112.zevtc | Bin 0 -> 10372 bytes tests/parsing.rs | 1 + tests/wvw.rs | 11 +++++++++++ 3 files changed, 12 insertions(+) create mode 100644 tests/logs/wvw-20211112.zevtc create mode 100644 tests/wvw.rs (limited to 'tests') diff --git a/tests/logs/wvw-20211112.zevtc b/tests/logs/wvw-20211112.zevtc new file mode 100644 index 0000000..a5e135d Binary files /dev/null and b/tests/logs/wvw-20211112.zevtc differ diff --git a/tests/parsing.rs b/tests/parsing.rs index 3eb3a4b..49e6fe9 100644 --- a/tests/parsing.rs +++ b/tests/parsing.rs @@ -13,6 +13,7 @@ macro_rules! test { let log = evtclib::raw::parse_zip(&mut file).expect("parsing zip failed"); let log = evtclib::process(&log).expect("processing log failed"); assert_eq!(log.encounter(), Some($boss)); + assert!(!log.is_generic()); let players = $players; diff --git a/tests/wvw.rs b/tests/wvw.rs new file mode 100644 index 0000000..5af15c7 --- /dev/null +++ b/tests/wvw.rs @@ -0,0 +1,11 @@ +//! Tests for WvW log parsing. +//! +//! WvW logs are a bit special in some regards (no proper boss ID, players with autogenerated +//! names), so it is good to have some basic testing for those. + +#[test] +fn test_smoke() { + let log = "./tests/logs/wvw-20211112.zevtc"; + let log = evtclib::process_file(log, evtclib::Compression::Zip).unwrap(); + assert!(log.is_generic()); +} -- cgit v1.2.3