24 lines
726 B
Rust
24 lines
726 B
Rust
mod tests {
|
|
use voctool::voc::blocks::BlockType;
|
|
use voctool::voc::VocFile;
|
|
|
|
#[test]
|
|
fn text_eden_mus() {
|
|
let tests_path = std::env::current_dir().unwrap().join("tests");
|
|
let file_path = tests_path.join("EDEN.MUS");
|
|
let voc = VocFile::from_file(file_path.to_str().unwrap());
|
|
|
|
// Version
|
|
assert_eq!((1, 10), voc.version);
|
|
|
|
// Checksum
|
|
assert!(voc.checksum);
|
|
|
|
// Text Block
|
|
let block = voc.blocks.get(0).unwrap().get_info().as_ref().unwrap();
|
|
assert_eq!(BlockType::Text, block.block_type);
|
|
assert_eq!(0x1A, block.start_address);
|
|
assert_eq!(0xB5, block.end_address);
|
|
assert_eq!(155, block.get_size());
|
|
}
|
|
} |