Skip to content

Commit c0cc62c

Browse files
committed
Add testLoadLevelDatRaw to TagLoaderTest
1 parent 7290cd8 commit c0cc62c

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎src/test/java/org/glavo/nbt/tag/TagLoaderTest.java‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,18 @@ void testLoadLevelDat(Loader loader) throws IOException {
7777
assertNotNull(dataTag);
7878
assertInstanceOf(CompoundTag.class, dataTag);
7979
}
80+
81+
/// Loads an uncompressed level.dat file
82+
@ParameterizedTest
83+
@EnumSource
84+
void testLoadLevelDatRaw(Loader loader) throws IOException {
85+
Path levelDatPath = TestResources.getResource("/assets/nbt/level.dat.raw");
86+
CompoundTag levelDat = loader.load(levelDatPath, CompoundTag.class);
87+
assertEquals("", levelDat.getName());
88+
assertEquals(1, levelDat.size());
89+
90+
Tag dataTag = levelDat.get("Data");
91+
assertNotNull(dataTag);
92+
assertInstanceOf(CompoundTag.class, dataTag);
93+
}
8094
}
3.84 KB
Binary file not shown.

0 commit comments

Comments
 (0)