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

Unified Diff: packages/dart_style/test/formatter_test.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 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 | « packages/dart_style/test/comments/top_level.unit ('k') | packages/dart_style/test/io_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/dart_style/test/formatter_test.dart
diff --git a/packages/dart_style/test/formatter_test.dart b/packages/dart_style/test/formatter_test.dart
index b50271f0683d70707950008a2acee6f16392aa8f..deb725cd7a8be35cb9fad8ee91c4553b9f97ee6f 100644
--- a/packages/dart_style/test/formatter_test.dart
+++ b/packages/dart_style/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));
}
});
@@ -139,7 +137,7 @@ void testDirectory(String name) {
var testDir = p.dirname(currentMirrorSystem()
.findLibrary(#dart_style.test.formatter_test)
.uri
- .path);
+ .toFilePath());
var entries = new Directory(p.join(testDir, name))
.listSync(recursive: true, followLinks: false);
@@ -188,6 +186,12 @@ void testDirectory(String name) {
expectedOutput += lines[i] + "\n";
}
+ // TODO(rnystrom): Stop skipping these tests when possible.
+ if (description.contains("(skip:")) {
+ print("skipping $description");
+ continue;
+ }
+
test(description, () {
var isCompilationUnit = p.extension(entry.path) == ".unit";
« no previous file with comments | « packages/dart_style/test/comments/top_level.unit ('k') | packages/dart_style/test/io_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698