Make LibAC be web compatible for UUIDs
This commit is contained in:
parent
960cf0d789
commit
d6f0e05713
7 changed files with 254 additions and 52 deletions
|
@ -8,6 +8,7 @@ import 'package:libac_flutter/nbt/Stream.dart';
|
|||
import 'package:libac_flutter/nbt/Tag.dart';
|
||||
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
|
||||
import 'package:libac_flutter/nbt/impl/StringTag.dart';
|
||||
import 'package:libac_flutter/utils/uuid/NbtUUID.dart';
|
||||
import 'package:libac_flutter/utils/uuid/UUID.dart';
|
||||
|
||||
void main() {
|
||||
|
@ -53,7 +54,7 @@ void main() {
|
|||
test("Generate a UUID v4, save to NBT, and read it back again", () async {
|
||||
var id = UUID.generate(4);
|
||||
CompoundTag tag = CompoundTag();
|
||||
NbtUtils.writeUUID(tag, "test", id);
|
||||
NbtUtils.writeUUID(tag, "test", NbtUUID.fromUUID(id));
|
||||
|
||||
var newID = NbtUtils.readUUID(tag, "test");
|
||||
expect(id.toString(), newID.toString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue