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

Unified Diff: packages/source_span/test/file_message_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/pubspec.yaml ('k') | packages/source_span/test/highlight_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/source_span/test/file_message_test.dart
diff --git a/packages/source_span/test/file_message_test.dart b/packages/source_span/test/file_message_test.dart
deleted file mode 100644
index 5935c58820e76a8ba7ea42d2c2ca2bdb51b19c4f..0000000000000000000000000000000000000000
--- a/packages/source_span/test/file_message_test.dart
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test/test.dart';
-import 'package:source_span/source_span.dart';
-import 'package:source_span/src/colors.dart' as colors;
-
-main() {
- var file;
- setUp(() {
- file = new SourceFile("""
-foo bar baz
-whiz bang boom
-zip zap zop
-""", url: "foo.dart");
- });
-
- test("points to the span in the source", () {
- expect(file.span(4, 7).message("oh no"), equals("""
-line 1, column 5 of foo.dart: oh no
-foo bar baz
- ^^^"""));
- });
-
- test("gracefully handles a missing source URL", () {
- var span = new SourceFile("foo bar baz").span(4, 7);
- expect(span.message("oh no"), equals("""
-line 1, column 5: oh no
-foo bar baz
- ^^^"""));
- });
-
- test("highlights the first line of a multiline span", () {
- expect(file.span(4, 20).message("oh no"), equals("""
-line 1, column 5 of foo.dart: oh no
-foo bar baz
- ^^^^^^^^"""));
- });
-
- test("works for a point span", () {
- expect(file.location(4).pointSpan().message("oh no"), equals("""
-line 1, column 5 of foo.dart: oh no
-foo bar baz
- ^"""));
- });
-
- test("works for a point span at the end of a line", () {
- expect(file.location(11).pointSpan().message("oh no"), equals("""
-line 1, column 12 of foo.dart: oh no
-foo bar baz
- ^"""));
- });
-
- test("works for a point span at the end of the file", () {
- expect(file.location(38).pointSpan().message("oh no"), equals("""
-line 3, column 12 of foo.dart: oh no
-zip zap zop
- ^"""));
- });
-
- test("works for a point span in an empty file", () {
- expect(new SourceFile("").location(0).pointSpan().message("oh no"),
- equals("""
-line 1, column 1: oh no
-
-^"""));
- });
-
- test("works for a single-line file without a newline", () {
- expect(new SourceFile("foo bar").span(0, 7).message("oh no"),
- equals("""
-line 1, column 1: oh no
-foo bar
-^^^^^^^"""));
- });
-
- group("colors", () {
- test("doesn't colorize if color is false", () {
- expect(file.span(4, 7).message("oh no", color: false), equals("""
-line 1, column 5 of foo.dart: oh no
-foo bar baz
- ^^^"""));
- });
-
- test("colorizes if color is true", () {
- expect(file.span(4, 7).message("oh no", color: true), equals("""
-line 1, column 5 of foo.dart: oh no
-foo ${colors.RED}bar${colors.NONE} baz
- ${colors.RED}^^^${colors.NONE}"""));
- });
-
- test("uses the given color if it's passed", () {
- expect(file.span(4, 7).message("oh no", color: colors.YELLOW), equals("""
-line 1, column 5 of foo.dart: oh no
-foo ${colors.YELLOW}bar${colors.NONE} baz
- ${colors.YELLOW}^^^${colors.NONE}"""));
- });
- });
-}
« no previous file with comments | « packages/source_span/pubspec.yaml ('k') | packages/source_span/test/highlight_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698