1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00
azalea/azalea-nbt/tests/decode.rs
2021-12-18 17:02:23 -06:00

19 lines
529 B
Rust

use azalea_nbt::Tag;
use std::collections::HashMap;
#[test]
fn test_hello_world() {
// read hello_world.nbt
let mut file = std::fs::File::open("tests/hello_world.nbt").unwrap();
let tag = Tag::read(&mut file).unwrap();
assert_eq!(
tag,
Tag::Compound(HashMap::from_iter(vec![(
"hello world".to_string(),
Tag::Compound(HashMap::from_iter(vec![(
"name".to_string(),
Tag::String("Bananrama".to_string()),
)]))
)]))
);
}