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

Side by Side Diff: test/backend/platform_selector/scanner_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/backend/platform_selector/parser_test.dart ('k') | test/frontend/expect_async_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) 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 import 'package:unittest/unittest.dart'; 5 import 'package:test/test.dart';
6 import 'package:unittest/src/backend/platform_selector/scanner.dart'; 6 import 'package:test/src/backend/platform_selector/scanner.dart';
7 import 'package:unittest/src/backend/platform_selector/token.dart'; 7 import 'package:test/src/backend/platform_selector/token.dart';
8 8
9 void main() { 9 void main() {
10 group("peek()", () { 10 group("peek()", () {
11 test("returns the next token without consuming it", () { 11 test("returns the next token without consuming it", () {
12 var scanner = new Scanner("( )"); 12 var scanner = new Scanner("( )");
13 expect(scanner.peek().type, equals(TokenType.leftParen)); 13 expect(scanner.peek().type, equals(TokenType.leftParen));
14 expect(scanner.peek().type, equals(TokenType.leftParen)); 14 expect(scanner.peek().type, equals(TokenType.leftParen));
15 expect(scanner.peek().type, equals(TokenType.leftParen)); 15 expect(scanner.peek().type, equals(TokenType.leftParen));
16 }); 16 });
17 17
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // Complicate the selector to test that the span covers it correctly. 257 // Complicate the selector to test that the span covers it correctly.
258 var token = _scan(" $selector "); 258 var token = _scan(" $selector ");
259 expect(token.type, equals(type)); 259 expect(token.type, equals(type));
260 expect(token.span.text, equals(selector)); 260 expect(token.span.text, equals(selector));
261 expect(token.span.start.offset, equals(3)); 261 expect(token.span.start.offset, equals(3));
262 expect(token.span.end.offset, equals(3 + selector.length)); 262 expect(token.span.end.offset, equals(3 + selector.length));
263 } 263 }
264 264
265 /// Scans a single token from [selector]. 265 /// Scans a single token from [selector].
266 Token _scan(String selector) => new Scanner(selector).next(); 266 Token _scan(String selector) => new Scanner(selector).next();
OLDNEW
« no previous file with comments | « test/backend/platform_selector/parser_test.dart ('k') | test/frontend/expect_async_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698