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

Side by Side Diff: pkg/analyzer/test/src/util/absolute_path_test.dart

Issue 2391423003: Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0. (Closed)
Patch Set: Created 4 years, 2 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
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 library analyzer.test.src.util.absolute_path_test; 5 library analyzer.test.src.util.absolute_path_test;
6 6
7 import 'package:analyzer/src/util/absolute_path.dart'; 7 import 'package:analyzer/src/util/absolute_path.dart';
8 import 'package:test/test.dart';
8 import 'package:test_reflective_loader/test_reflective_loader.dart'; 9 import 'package:test_reflective_loader/test_reflective_loader.dart';
9 import 'package:unittest/unittest.dart';
10 10
11 import '../../utils.dart'; 11 import '../../utils.dart';
12 12
13 main() { 13 main() {
14 initializeTestEnvironment(); 14 initializeTestEnvironment();
15 defineReflectiveTests(AbsolutePathContextPosixTest); 15 defineReflectiveSuite(() {
16 defineReflectiveTests(AbsolutePathContextWindowsTest); 16 defineReflectiveTests(AbsolutePathContextPosixTest);
17 defineReflectiveTests(AbsolutePathContextWindowsTest);
18 });
17 } 19 }
18 20
19 @reflectiveTest 21 @reflectiveTest
20 class AbsolutePathContextPosixTest { 22 class AbsolutePathContextPosixTest {
21 AbsolutePathContext context = new AbsolutePathContext(false); 23 AbsolutePathContext context = new AbsolutePathContext(false);
22 24
23 void test_append() { 25 void test_append() {
24 expect(context.append(r'/path/to', r'foo.dart'), r'/path/to/foo.dart'); 26 expect(context.append(r'/path/to', r'foo.dart'), r'/path/to/foo.dart');
25 } 27 }
26 28
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 expect(context.split(r'C:\path\to\foo'), [r'C:', r'path', r'to', r'foo']); 135 expect(context.split(r'C:\path\to\foo'), [r'C:', r'path', r'to', r'foo']);
134 expect(context.split(r'C:\path'), [r'C:', r'path']); 136 expect(context.split(r'C:\path'), [r'C:', r'path']);
135 } 137 }
136 138
137 void test_suffix() { 139 void test_suffix() {
138 expect( 140 expect(
139 context.suffix(r'C:\root\path', r'C:\root\path\a\b.dart'), r'a\b.dart'); 141 context.suffix(r'C:\root\path', r'C:\root\path\a\b.dart'), r'a\b.dart');
140 expect(context.suffix(r'C:\root\path', r'C:\root\other.dart'), isNull); 142 expect(context.suffix(r'C:\root\path', r'C:\root\other.dart'), isNull);
141 } 143 }
142 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698