Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: test/formatter_test.dart

Issue 2427063003: Fix test to not depend on analyzer error message. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/formatter_test.dart
diff --git a/test/formatter_test.dart b/test/formatter_test.dart
index b50271f0683d70707950008a2acee6f16392aa8f..4e3df04454ee9077f91b870dbc311559719fce9c 100644
--- a/test/formatter_test.dart
+++ b/test/formatter_test.dart
@@ -81,11 +81,9 @@ void main() {
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));
}
});
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698