diff options
| author | mat <github@matdoes.dev> | 2023-03-24 13:55:11 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2023-03-24 13:55:11 +0000 |
| commit | 4b387c320c126d2db69ec6f2dc1a610a58928a2e (patch) | |
| tree | 56a22a7872cd1309721c05a770bebac05d0adedb /azalea-nbt/tests | |
| parent | bdc42557479e6201f88151468ef1331820f62681 (diff) | |
| parent | 0641dac7f0aa6c055fca8ab633ad85859d0ddd97 (diff) | |
| download | azalea-drasl-4b387c320c126d2db69ec6f2dc1a610a58928a2e.tar.xz | |
fix merge conflict
Diffstat (limited to 'azalea-nbt/tests')
| -rw-r--r-- | azalea-nbt/tests/inttest1023.nbt | bin | 0 -> 4104 bytes | |||
| -rwxr-xr-x | azalea-nbt/tests/inttest16.nbt (renamed from azalea-nbt/tests/inttest.nbt) | bin | 95 -> 95 bytes | |||
| -rw-r--r-- | azalea-nbt/tests/inttest3.nbt | bin | 0 -> 24 bytes | |||
| -rwxr-xr-x | azalea-nbt/tests/tests.rs | 32 |
4 files changed, 31 insertions, 1 deletions
diff --git a/azalea-nbt/tests/inttest1023.nbt b/azalea-nbt/tests/inttest1023.nbt Binary files differnew file mode 100644 index 00000000..481dde19 --- /dev/null +++ b/azalea-nbt/tests/inttest1023.nbt diff --git a/azalea-nbt/tests/inttest.nbt b/azalea-nbt/tests/inttest16.nbt Binary files differindex ad9255f2..ad9255f2 100755 --- a/azalea-nbt/tests/inttest.nbt +++ b/azalea-nbt/tests/inttest16.nbt diff --git a/azalea-nbt/tests/inttest3.nbt b/azalea-nbt/tests/inttest3.nbt Binary files differnew file mode 100644 index 00000000..2890f577 --- /dev/null +++ b/azalea-nbt/tests/inttest3.nbt diff --git a/azalea-nbt/tests/tests.rs b/azalea-nbt/tests/tests.rs index a7f6912f..5c82c3c7 100755 --- a/azalea-nbt/tests/tests.rs +++ b/azalea-nbt/tests/tests.rs @@ -1,4 +1,4 @@ -use azalea_nbt::{NbtCompound, NbtList, Nbt}; +use azalea_nbt::{Nbt, NbtCompound, NbtList}; use std::io::Cursor; #[test] @@ -108,3 +108,33 @@ fn test_simple_player() { assert_eq!(decoded_tag, original_tag); } + +// #[test] +// fn test_inttest() { +// let original = include_bytes!("inttest.nbt").to_vec(); + +// let mut original_stream = Cursor::new(original); +// let original_tag = Nbt::read_gzip(&mut original_stream).unwrap(); + +// let mut result = Vec::new(); +// original_tag.write(&mut result); + +// let decoded_tag = Nbt::read(&mut Cursor::new(&result)).unwrap(); + +// assert_eq!(decoded_tag, original_tag); +// } + +#[test] +fn test_inttest1023() { + let original = include_bytes!("inttest1023.nbt").to_vec(); + + let mut original_stream = Cursor::new(original.as_slice()); + let original_tag = Nbt::read(&mut original_stream).unwrap(); + + let mut result = Vec::new(); + original_tag.write(&mut result); + + let decoded_tag = Nbt::read(&mut Cursor::new(&result)).unwrap(); + + assert_eq!(decoded_tag, original_tag); +} |
