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

Side by Side Diff: test/util/string_literal_iterator_test.dart

Issue 1053443002: Rename the package to "test". (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 8 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/util/one_off_handler_test.dart ('k') | test/utils.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:test/test.dart';
9 import 'package:unittest/src/util/string_literal_iterator.dart'; 9 import 'package:test/src/util/string_literal_iterator.dart';
10 10
11 final _offset = "final str = ".length; 11 final _offset = "final str = ".length;
12 12
13 void main() { 13 void main() {
14 group("returns simple characters in", () { 14 group("returns simple characters in", () {
15 test("a single simple string", () { 15 test("a single simple string", () {
16 var iter = _parse('"abc"'); 16 var iter = _parse('"abc"');
17 17
18 expect(iter.current, isNull); 18 expect(iter.current, isNull);
19 expect(iter.offset, equals(_offset)); 19 expect(iter.offset, equals(_offset));
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 }, 'is the rune "$char"'); 236 }, 'is the rune "$char"');
237 } 237 }
238 238
239 /// Parses [dart], which should be a string literal, into a 239 /// Parses [dart], which should be a string literal, into a
240 /// [StringLiteralIterator]. 240 /// [StringLiteralIterator].
241 StringLiteralIterator _parse(String dart) { 241 StringLiteralIterator _parse(String dart) {
242 var literal = parseCompilationUnit("final str = $dart;") 242 var literal = parseCompilationUnit("final str = $dart;")
243 .declarations.single.variables.variables.single.initializer; 243 .declarations.single.variables.variables.single.initializer;
244 return new StringLiteralIterator(literal); 244 return new StringLiteralIterator(literal);
245 } 245 }
OLDNEW
« no previous file with comments | « test/util/one_off_handler_test.dart ('k') | test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698