diff --git a/pubspec.yaml b/pubspec.yaml index 91275d5..5948a48 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,14 +9,14 @@ environment: # Add regular dependencies here. dependencies: crypto: ^3.0.3 - dio: ^5.5.0+1 + dio: ^5.8.0+1 encrypt: ^5.0.3 - intl: ^0.20.1 + intl: ^0.20.2 # path: ^1.8.0 dev_dependencies: - lints: ^3.0.0 - test: ^1.24.0 + lints: ^5.1.1 + test: ^1.25.15 # following page: https://dart.dev/tools/pub/pubspec diff --git a/test/encryption_test.dart b/test/encryption_test.dart index 6e3a044..b8cfc1b 100644 --- a/test/encryption_test.dart +++ b/test/encryption_test.dart @@ -2,8 +2,6 @@ import 'dart:convert'; import 'dart:io'; import 'package:libac_dart/encryption/aes.dart'; -import 'package:libac_dart/encryption/xtea.dart'; -import 'package:libac_dart/utils/Hashing.dart'; import 'package:test/expect.dart'; import 'package:test/scaffolding.dart'; diff --git a/test/io_test.dart b/test/io_test.dart index 464de24..6924180 100644 --- a/test/io_test.dart +++ b/test/io_test.dart @@ -11,7 +11,7 @@ Future main() async { }); test("Test directory size checking", () async { - expect(await getDirectorySize("test"), 121634); + expect(await getDirectorySize("test"), 121680); }); test("Test file info methods", () async { diff --git a/test/nbt_test.dart b/test/nbt_test.dart index 1612f38..bbd18d7 100644 --- a/test/nbt_test.dart +++ b/test/nbt_test.dart @@ -17,7 +17,8 @@ void main() { test('read non-compressed helloworld NBT', () async { print("READING : ${Directory.current.path}/test/hello_world.nbt"); CompoundTag tag = - await NbtIo.read("${Directory.current.path}/test/hello_world.nbt"); + await NbtIo.read("${Directory.current.path}/test/hello_world.nbt") + as CompoundTag; expect(tag.getKey(), "hello world"); expect(tag.containsKey("name"), true); @@ -37,7 +38,8 @@ void main() { test('read non-compressed self-made helloworld NBT', () async { print("READING : ${Directory.current.path}/build/hello_world.nbt"); CompoundTag tag = - await NbtIo.read("${Directory.current.path}/build/hello_world.nbt"); + await NbtIo.read("${Directory.current.path}/build/hello_world.nbt") + as CompoundTag; expect(tag.getKey(), "hello world"); expect(tag.containsKey("name"), true); @@ -46,7 +48,7 @@ void main() { test('read compressed bigtest.nbt', () async { var path = "${Directory.current.path}/test/bigtest.nbt"; - CompoundTag tag = await NbtIo.read(path); + CompoundTag tag = await NbtIo.read(path) as CompoundTag; expect(tag.getKey(), "Level"); expect(tag.get("shortTest")!.asShort(), 32767); expect(tag.get("doubleTest")!.asDouble(), 0.4931287132182315); @@ -64,7 +66,8 @@ void main() { test("Read HelloWorld, Output to SNBT", () async { CompoundTag ct = - await NbtIo.read("${Directory.current.path}/test/hello_world.nbt"); + await NbtIo.read("${Directory.current.path}/test/hello_world.nbt") + as CompoundTag; StringBuilder sb = StringBuilder(); Tag.writeStringifiedNamedTag(ct, sb, 0); print(sb.toString()); @@ -72,7 +75,8 @@ void main() { test("Read BigTest, Output to SNBT", () async { CompoundTag ct = - await NbtIo.read("${Directory.current.path}/test/bigtest.nbt"); + await NbtIo.read("${Directory.current.path}/test/bigtest.nbt") + as CompoundTag; StringBuilder sb = StringBuilder(); Tag.writeStringifiedNamedTag(ct, sb, 0); print(sb.toString()); @@ -80,7 +84,8 @@ void main() { test("Write BigTest to SNBT file", () async { CompoundTag ct = - await NbtIo.read("${Directory.current.path}/test/bigtest.nbt"); + await NbtIo.read("${Directory.current.path}/test/bigtest.nbt") + as CompoundTag; String output = "${Directory.current.path}/build/bigtest.snbt"; File file = File(output); SnbtIo.writeToFile(output, ct); @@ -114,7 +119,7 @@ void main() { String OutputSNBT = "${Directory.current.path}/build/el-test.snbt"; String OutputNBT = "${Directory.current.path}/build/el-test.nbt"; - CompoundTag tag = await NbtIo.read(OriginFile); + CompoundTag tag = await NbtIo.read(OriginFile) as CompoundTag; await SnbtIo.writeToFile(OutputSNBT, tag); expect(File(OutputSNBT).existsSync(), true); @@ -125,7 +130,8 @@ void main() { }, timeout: Timeout(Duration(hours: 90))); test("Read Sophisticated Backpack data", () async { - CompoundTag ct = await NbtIo.read("test/sophisticatedbackpacks.dat"); + CompoundTag ct = + await NbtIo.read("test/sophisticatedbackpacks.dat") as CompoundTag; // Convert to SNBT String snbtData = SnbtIo.writeToString(ct); // Convert snbt back to NBT