Fix dart:convert "UTF8" -> "utf8". While I was at it, I: - Removed some unused imports. - Fixed a deprecated API call. - Removed the no-longer needed analysis options file.
diff --git a/pkgs/test_descriptor/CHANGELOG.md b/pkgs/test_descriptor/CHANGELOG.md index cbdb5cd..46908ef 100644 --- a/pkgs/test_descriptor/CHANGELOG.md +++ b/pkgs/test_descriptor/CHANGELOG.md
@@ -1,3 +1,7 @@ +## 1.1.1 + +* Update to lowercase Dart core library constants. + ## 1.1.0 * Add a `path()` function that returns the a path within the sandbox directory.
diff --git a/pkgs/test_descriptor/analysis_options.yaml b/pkgs/test_descriptor/analysis_options.yaml deleted file mode 100644 index a10d4c5..0000000 --- a/pkgs/test_descriptor/analysis_options.yaml +++ /dev/null
@@ -1,2 +0,0 @@ -analyzer: - strong-mode: true
diff --git a/pkgs/test_descriptor/lib/src/file_descriptor.dart b/pkgs/test_descriptor/lib/src/file_descriptor.dart index 93dec58..5220b6e 100644 --- a/pkgs/test_descriptor/lib/src/file_descriptor.dart +++ b/pkgs/test_descriptor/lib/src/file_descriptor.dart
@@ -38,7 +38,7 @@ factory FileDescriptor(String name, contents) { if (contents is String) return new _StringFileDescriptor(name, contents); if (contents is List) { - return new _BinaryFileDescriptor(name, DelegatingList.typed(contents)); + return new _BinaryFileDescriptor(name, contents.cast<int>()); } if (contents == null) return new _BinaryFileDescriptor(name, []); return new _MatcherFileDescriptor(name, contents);
diff --git a/pkgs/test_descriptor/pubspec.yaml b/pkgs/test_descriptor/pubspec.yaml index af77fab..68e91db 100644 --- a/pkgs/test_descriptor/pubspec.yaml +++ b/pkgs/test_descriptor/pubspec.yaml
@@ -1,11 +1,11 @@ name: test_descriptor -version: 1.1.0 +version: 1.1.1 description: An API for defining and verifying directory structures. author: Dart Team <misc@dartlang.org> homepage: https://github.com/dart-lang/test_descriptor environment: - sdk: '>=1.21.0 <2.0.0' + sdk: '>=2.0.0-dev.36.0 <3.0.0' dependencies: async: '>=1.10.0 <3.0.0'
diff --git a/pkgs/test_descriptor/test/directory_test.dart b/pkgs/test_descriptor/test/directory_test.dart index 97dcacb..d455e16 100644 --- a/pkgs/test_descriptor/test/directory_test.dart +++ b/pkgs/test_descriptor/test/directory_test.dart
@@ -136,7 +136,7 @@ test("loads a file", () { var dir = d.dir('dir', [d.file('name.txt', 'contents'), d.file('other.txt', 'wrong')]); - expect(UTF8.decodeStream(dir.load('name.txt')), + expect(utf8.decodeStream(dir.load('name.txt')), completion(equals('contents'))); }); @@ -148,7 +148,7 @@ d.file('name.txt', 'contents') ]); - expect(UTF8.decodeStream(dir.load('subdir/name.txt')), + expect(utf8.decodeStream(dir.load('subdir/name.txt')), completion(equals('subcontents'))); }); @@ -206,7 +206,7 @@ ]); expect( - UTF8.decodeStream(dir.load('name')), completion(equals('contents'))); + utf8.decodeStream(dir.load('name')), completion(equals('contents'))); }); });
diff --git a/pkgs/test_descriptor/test/file_test.dart b/pkgs/test_descriptor/test/file_test.dart index 70093c1..cbc670a 100644 --- a/pkgs/test_descriptor/test/file_test.dart +++ b/pkgs/test_descriptor/test/file_test.dart
@@ -139,7 +139,7 @@ test("readAsBytes() returns the contents of a text file as a byte stream", () { - expect(UTF8.decodeStream(d.file('name.txt', 'contents').readAsBytes()), + expect(utf8.decodeStream(d.file('name.txt', 'contents').readAsBytes()), completion(equals('contents'))); });
diff --git a/pkgs/test_descriptor/test/sandbox_test.dart b/pkgs/test_descriptor/test/sandbox_test.dart index 34c90ac..be4a959 100644 --- a/pkgs/test_descriptor/test/sandbox_test.dart +++ b/pkgs/test_descriptor/test/sandbox_test.dart
@@ -4,8 +4,6 @@ @TestOn('vm') -import 'dart:async'; -import 'dart:convert'; import 'dart:io'; import 'package:path/path.dart' as p; @@ -13,8 +11,6 @@ import 'package:test_descriptor/test_descriptor.dart' as d; -import 'utils.dart'; - void main() { test("accessing the getter creates the directory", () { expect(new Directory(d.sandbox).existsSync(), isTrue);