Implement basic SNBT reader and testsuite
This commit is contained in:
parent
396c660113
commit
a0f372693b
17 changed files with 352 additions and 2 deletions
|
@ -82,12 +82,19 @@ void main() {
|
|||
await NbtIo.read("${Directory.current.path}/test/bigtest.nbt");
|
||||
String output = "${Directory.current.path}/build/bigtest.snbt";
|
||||
File file = File(output);
|
||||
SnbtIo.write(output, ct);
|
||||
SnbtIo.writeToFile(output, ct);
|
||||
|
||||
// Expect that the file exists
|
||||
expect(file.existsSync(), true);
|
||||
});
|
||||
|
||||
test("Read BigTest from SNBT file", () async {
|
||||
CompoundTag tag = await SnbtIo.readFromFile(
|
||||
"${Directory.current.path}/build/bigtest.snbt") as CompoundTag;
|
||||
|
||||
expect(tag.containsKey("stringTest"), true);
|
||||
});
|
||||
|
||||
test("Write NULL UUID to NBT", () async {
|
||||
CompoundTag tag = CompoundTag();
|
||||
NbtUtils.writeUUID(tag, "test", NbtUUID.fromUUID(UUID.ZERO));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue