THRIFT-3981 Enable analyzer strong mode in Dart library
Client: Dart
Patch: Mark Erickson <merickson@apache.org>
This closes #1135
diff --git a/test/dart/test_client/.analysis_options b/test/dart/test_client/.analysis_options
new file mode 100644
index 0000000..a10d4c5
--- /dev/null
+++ b/test/dart/test_client/.analysis_options
@@ -0,0 +1,2 @@
+analyzer:
+ strong-mode: true
diff --git a/test/dart/test_client/bin/main.dart b/test/dart/test_client/bin/main.dart
index 78a4f79..996844b 100644
--- a/test/dart/test_client/bin/main.dart
+++ b/test/dart/test_client/bin/main.dart
@@ -251,7 +251,7 @@
}));
tests.add(new TTest(TEST_CONTAINERS, 'testSet', () async {
- var input = new Set.from([-2, -1, 0, 1, 2]);
+ var input = new Set<int>.from([-2, -1, 0, 1, 2]);
var result = await client.testSet(input);
var equality = const SetEquality();
if (!equality.equals(result, input)) throw new TTestError(result, input);
diff --git a/test/dart/test_client/pubspec.yaml b/test/dart/test_client/pubspec.yaml
index 493ee32..a91aa45 100644
--- a/test/dart/test_client/pubspec.yaml
+++ b/test/dart/test_client/pubspec.yaml
@@ -20,8 +20,10 @@
description: A client integration test for the Dart Thrift library
author: Apache Thrift Developers <dev@thrift.apache.org>
homepage: http://thrift.apache.org
+
environment:
- sdk: ^1.12.0
+ sdk: ">=1.13.0 <2.0.0"
+
dependencies:
args: ^0.13.0
http: ^0.11.0
@@ -29,5 +31,6 @@
path: ../../../lib/dart
thrift_test:
path: ../gen-dart/thrift_test
+
dev_dependencies:
test: "^0.12.0"