28 lines
729 B
Rust
28 lines
729 B
Rust
use maraiah::{durandal::bin, marathon::trm};
|
|
|
|
#[test]
|
|
fn read_term_must_process_map0()
|
|
{
|
|
let inp = bin::rd_array(INPUT, trm::read_term).unwrap();
|
|
let out = include!("data/term.out");
|
|
|
|
// for better debug output, we iterate over each item
|
|
assert_eq!(inp.len(), out.len());
|
|
|
|
for (itrm, otrm) in inp.iter().zip(&out) {
|
|
assert_eq!(itrm.groups.len(), otrm.groups.len());
|
|
for (igrp, ogrp) in itrm.groups.iter().zip(&otrm.groups) {
|
|
assert_eq!(igrp, ogrp);
|
|
}
|
|
|
|
assert_eq!(itrm.faces.len(), otrm.faces.len());
|
|
for (ifac, ofac) in itrm.faces.iter().zip(&otrm.faces) {
|
|
assert_eq!(ifac, ofac);
|
|
}
|
|
}
|
|
}
|
|
|
|
const INPUT: &'static [u8] = include_bytes!("data/term.in");
|
|
|
|
// EOF
|