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

Unified Diff: test/file_test.dart

Issue 1039603004: Fix FileSpan.context to include FileSpan.text. (Closed) Base URL: git@github.com:dart-lang/source_span.git@master
Patch Set: Created 5 years, 9 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/file_test.dart
diff --git a/test/file_test.dart b/test/file_test.dart
index 114a17e44ba116d3895cffd270f0665c88d2f894..c27c1f64fe876ed97097be71ffc64c5aa37c8745 100644
--- a/test/file_test.dart
+++ b/test/file_test.dart
@@ -253,6 +253,12 @@ zip zap zop""", url: "bar.dart").span(10, 11);
expect(file.span(8, 15).text, equals("baz\nwhi"));
});
+ test("context contains the span's text", () {
+ var span = file.span(8, 15);
+ expect(span.context.contains(span.text), isTrue);
+ expect(span.context, equals('foo bar baz\nwhiz bang boom\n'));
+ });
+
group("union()", () {
var span;
setUp(() {
@@ -367,4 +373,4 @@ zip zap zop""", url: "bar.dart").span(10, 11);
});
});
});
-}
+}
« 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