Fix negative number handling for snbt parsers
This commit is contained in:
parent
18e98ca918
commit
900a5358a8
7 changed files with 32 additions and 7 deletions
|
@ -144,4 +144,12 @@ void main() {
|
|||
CompoundTag CT =
|
||||
await SnbtIo.readFromFile("test/displayLoreTest.snbt") as CompoundTag;
|
||||
}, timeout: Timeout(Duration(minutes: 10)));
|
||||
|
||||
test("Test negative numbers from SNBT", () async {
|
||||
String snbt = "{test: -932.0d}";
|
||||
|
||||
CompoundTag ct = await SnbtIo.readFromString(snbt) as CompoundTag;
|
||||
expect(ct["test"]!.getTagType(), TagType.Double);
|
||||
expect(ct["test"]!.asDouble(), -932.0);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue