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

Unified Diff: packages/source_span/test/span_test.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers 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/source_span/test/highlight_test.dart ('k') | packages/source_span/test/utils_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/source_span/test/span_test.dart
diff --git a/packages/source_span/test/span_test.dart b/packages/source_span/test/span_test.dart
index 113848acf5e05f5493172406d2774cde91f91733..f980f30cb4d3cd045674d1d5f5129c1bce1c35ab 100644
--- a/packages/source_span/test/span_test.dart
+++ b/packages/source_span/test/span_test.dart
@@ -234,48 +234,16 @@ line 1, column 6 of foo.dart: oh no
${colors.YELLOW}foo bar${colors.NONE}
${colors.YELLOW}^^^^^^^${colors.NONE}"""));
});
- });
- group("message() with context", () {
- var spanWithContext;
- setUp(() {
- spanWithContext = new SourceSpanWithContext(
+ test("with context, underlines the right column", () {
+ var spanWithContext = new SourceSpanWithContext(
new SourceLocation(5, sourceUrl: "foo.dart"),
new SourceLocation(12, sourceUrl: "foo.dart"),
"foo bar",
"-----foo bar-----");
- });
- test("underlines under the right column", () {
expect(spanWithContext.message("oh no", color: colors.YELLOW), equals("""
line 1, column 6 of foo.dart: oh no
------${colors.YELLOW}foo bar${colors.NONE}-----
- ${colors.YELLOW}^^^^^^^${colors.NONE}"""));
- });
-
- test("underlines correctly when text appears twice", () {
- var span = new SourceSpanWithContext(
- new SourceLocation(9, column: 9, sourceUrl: "foo.dart"),
- new SourceLocation(12, column: 12, sourceUrl: "foo.dart"),
- "foo",
- "-----foo foo-----");
- expect(span.message("oh no", color: colors.YELLOW), equals("""
-line 1, column 10 of foo.dart: oh no
------foo ${colors.YELLOW}foo${colors.NONE}-----
- ${colors.YELLOW}^^^${colors.NONE}"""));
- });
-
- test("supports lines of preceeding context", () {
- var span = new SourceSpanWithContext(
- new SourceLocation(5, line: 3, column: 5, sourceUrl: "foo.dart"),
- new SourceLocation(12, line: 3, column: 12, sourceUrl: "foo.dart"),
- "foo bar",
- "previous\nlines\n-----foo bar-----\nfollowing line\n");
-
- expect(span.message("oh no", color: colors.YELLOW), equals("""
-line 4, column 6 of foo.dart: oh no
-previous
-lines
-----${colors.YELLOW}foo bar${colors.NONE}-----
${colors.YELLOW}^^^^^^^${colors.NONE}"""));
});
« no previous file with comments | « packages/source_span/test/highlight_test.dart ('k') | packages/source_span/test/utils_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698