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
pub mod net;
pub mod packets;
pub mod structures;
pub(crate) use structures::{Deserializable, Serializable, SliceCursor};
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn check_remote_deserialization() {
let mut data = include_bytes!("../test-data/remote.bin").to_vec();
let mut index = 0;
while index < data.len() {
let packet_len = u16::from_le_bytes([data[index], data[index + 1]]) as usize;
packets::Packet::from_slice(&mut data[index + 2..index + packet_len]);
index += packet_len;
}
todo!("make sure we found a certain number of present tiles")
}
}