Fix test to not depend on analyzer error message.
R=paulberry@google.com
Review URL: https://codereview.chromium.org//2427063003 .
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ce8399..7db038d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+# 0.2.11+1
+
+Fix test to not depend on analyzer error message.
+
+# 0.2.11
+
+* Widen dependency on analyzer to allow 0.29.x.
+
# 0.2.10
* Handle metadata annotations before parameters with trailing commas (#520).
diff --git a/bin/format.dart b/bin/format.dart
index 77dd82d..b0c1e32 100644
--- a/bin/format.dart
+++ b/bin/format.dart
@@ -14,7 +14,7 @@
import 'package:dart_style/src/source_code.dart';
// Note: The following line of code is modified by tool/grind.dart.
-const version = "0.2.11";
+const version = "0.2.11+1";
void main(List<String> args) {
var parser = new ArgParser(allowTrailingOptions: true);
diff --git a/pubspec.lock b/pubspec.lock
index 4f48aa0..2ff570c 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -49,12 +49,6 @@
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
- cli_util:
- description:
- name: cli_util
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.0.1+2"
collection:
description:
name: collection
@@ -78,7 +72,7 @@
name: csslib
url: "https://pub.dartlang.org"
source: hosted
- version: "0.13.2"
+ version: "0.13.2+1"
glob:
description:
name: glob
@@ -90,7 +84,7 @@
name: grinder
url: "https://pub.dartlang.org"
source: hosted
- version: "0.8.0+2"
+ version: "0.8.0+3"
html:
description:
name: html
@@ -114,7 +108,7 @@
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
- version: "3.0.2"
+ version: "3.0.3"
isolate:
description:
name: isolate
@@ -180,7 +174,7 @@
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.3.9"
+ version: "1.4.0"
plugin:
description:
name: plugin
@@ -252,7 +246,7 @@
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
- version: "1.6.7"
+ version: "1.6.8"
stream_channel:
description:
name: stream_channel
@@ -276,7 +270,7 @@
name: test
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.15+9"
+ version: "0.12.15+10"
typed_data:
description:
name: typed_data
@@ -307,23 +301,11 @@
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
- when:
- description:
- name: when
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.2.0"
- which:
- description:
- name: which
- url: "https://pub.dartlang.org"
- source: hosted
- version: "0.1.3"
yaml:
description:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
- version: "2.1.11"
+ version: "2.1.12"
sdks:
dart: ">=1.19.0-dev.0.0 <2.0.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 6d48672..e02dcbb 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: dart_style
# Note: See tool/grind.dart for how to bump the version.
-version: 0.2.11
+version: 0.2.11+1
author: Dart Team <misc@dartlang.org>
description: Opinionated, automatic Dart source code formatter.
homepage: https://github.com/dart-lang/dart_style
diff --git a/test/formatter_test.dart b/test/formatter_test.dart
index b50271f..4e3df04 100644
--- a/test/formatter_test.dart
+++ b/test/formatter_test.dart
@@ -81,11 +81,9 @@
new DartFormatter().formatStatement("var x = 1;;");
fail("Should throw.");
- } catch (err) {
- expect(err, new isInstanceOf<FormatterException>());
- var message = err.message();
- expect(message, contains("Unexpected token"));
- expect(message, contains("column 11"));
+ } on FormatterException catch (ex) {
+ expect(ex.errors.length, equals(1));
+ expect(ex.errors.first.offset, equals(10));
}
});