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

Side by Side Diff: test/span_scanner_test.dart

Issue 1228353010: Upgrade to the new test runner. (Closed) Base URL: git@github.com:dart-lang/string_scanner@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « test/line_scanner_test.dart ('k') | test/string_scanner_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library string_scanner.span_scanner_test; 5 library string_scanner.span_scanner_test;
6 6
7 import 'package:string_scanner/string_scanner.dart'; 7 import 'package:string_scanner/string_scanner.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:test/test.dart';
9 9
10 void main() { 10 void main() {
11 var scanner; 11 var scanner;
12 setUp(() { 12 setUp(() {
13 scanner = new SpanScanner('foo\nbar\nbaz', sourceUrl: 'source'); 13 scanner = new SpanScanner('foo\nbar\nbaz', sourceUrl: 'source');
14 }); 14 });
15 15
16 test("tracks the span for the last match", () { 16 test("tracks the span for the last match", () {
17 scanner.scan('fo'); 17 scanner.scan('fo');
18 scanner.scan('o\nba'); 18 scanner.scan('o\nba');
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 expect(span.start.sourceUrl, equals(Uri.parse('source'))); 51 expect(span.start.sourceUrl, equals(Uri.parse('source')));
52 52
53 expect(span.end.offset, equals(6)); 53 expect(span.end.offset, equals(6));
54 expect(span.end.line, equals(1)); 54 expect(span.end.line, equals(1));
55 expect(span.end.column, equals(2)); 55 expect(span.end.column, equals(2));
56 expect(span.start.sourceUrl, equals(Uri.parse('source'))); 56 expect(span.start.sourceUrl, equals(Uri.parse('source')));
57 57
58 expect(span.text, equals('')); 58 expect(span.text, equals(''));
59 }); 59 });
60 } 60 }
OLDNEW
« no previous file with comments | « test/line_scanner_test.dart ('k') | test/string_scanner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698