diff options
| author | mat <github@matdoes.dev> | 2023-03-23 13:55:33 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2023-03-23 13:55:33 +0000 |
| commit | ecb3f2ffd7dd4aa26213844a023e37fab4057ed0 (patch) | |
| tree | 0cd0ea7eec8c05cdc8fae0a3ab15ef7c1402383c /azalea-nbt/tests | |
| parent | 2a07962af9a318114f38d3afe748a05212cfbd59 (diff) | |
| download | azalea-drasl-ecb3f2ffd7dd4aa26213844a023e37fab4057ed0.tar.xz | |
rename Tag to Nbt
Diffstat (limited to 'azalea-nbt/tests')
| -rwxr-xr-x | azalea-nbt/tests/tests.rs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/azalea-nbt/tests/tests.rs b/azalea-nbt/tests/tests.rs index 1555d7fa..a7f6912f 100755 --- a/azalea-nbt/tests/tests.rs +++ b/azalea-nbt/tests/tests.rs @@ -1,18 +1,18 @@ -use azalea_nbt::{NbtCompound, NbtList, Tag}; +use azalea_nbt::{NbtCompound, NbtList, Nbt}; use std::io::Cursor; #[test] fn test_decode_hello_world() { // read hello_world.nbt let buf = include_bytes!("hello_world.nbt").to_vec(); - let tag = Tag::read(&mut Cursor::new(&buf[..])).unwrap(); + let tag = Nbt::read(&mut Cursor::new(&buf[..])).unwrap(); assert_eq!( tag, - Tag::Compound(NbtCompound::from_iter(vec![( + Nbt::Compound(NbtCompound::from_iter(vec![( "hello world".into(), - Tag::Compound(NbtCompound::from_iter(vec![( + Nbt::Compound(NbtCompound::from_iter(vec![( "name".into(), - Tag::String("Bananrama".into()), + Nbt::String("Bananrama".into()), )])) )])) ); @@ -23,7 +23,7 @@ fn test_roundtrip_hello_world() { let original = include_bytes!("hello_world.nbt").to_vec(); let mut original_stream = Cursor::new(&original[..]); - let tag = Tag::read(&mut original_stream).unwrap(); + let tag = Nbt::read(&mut original_stream).unwrap(); // write hello_world.nbt let mut result = Vec::new(); @@ -38,21 +38,21 @@ fn test_bigtest() { let original = include_bytes!("bigtest.nbt").to_vec(); let mut original_stream = Cursor::new(original); - let original_tag = Tag::read_gzip(&mut original_stream).unwrap(); + let original_tag = Nbt::read_gzip(&mut original_stream).unwrap(); let mut result = Vec::new(); original_tag.write(&mut result); - let decoded_tag = Tag::read(&mut Cursor::new(&result)).unwrap(); + let decoded_tag = Nbt::read(&mut Cursor::new(&result)).unwrap(); assert_eq!(decoded_tag, original_tag); } #[test] fn test_stringtest() { - let correct_tag = Tag::Compound(NbtCompound::from_iter(vec