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

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

Issue 2298913003: Pull in test_reflective_loader 0.0.4 and switch analyzer to it. (Closed)
Patch Set: Fixes for review comments. Created 4 years, 3 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_reflective_loader/test_reflective_loader.dart';
8 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
9 10
10 import '../../reflective_tests.dart';
11 import '../../utils.dart'; 11 import '../../utils.dart';
12 12
13 main() { 13 main() {
14 initializeTestEnvironment(); 14 initializeTestEnvironment();
15 runReflectiveTests(AbsolutePathContextPosixTest); 15 defineReflectiveTests(AbsolutePathContextPosixTest);
16 runReflectiveTests(AbsolutePathContextWindowsTest); 16 defineReflectiveTests(AbsolutePathContextWindowsTest);
17 } 17 }
18 18
19 @reflectiveTest 19 @reflectiveTest
20 class AbsolutePathContextPosixTest { 20 class AbsolutePathContextPosixTest {
21 AbsolutePathContext context = new AbsolutePathContext(false); 21 AbsolutePathContext context = new AbsolutePathContext(false);
22 22
23 void test_append() { 23 void test_append() {
24 expect(context.append(r'/path/to', r'foo.dart'), r'/path/to/foo.dart'); 24 expect(context.append(r'/path/to', r'foo.dart'), r'/path/to/foo.dart');
25 } 25 }
26 26
(...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']); 133 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']); 134 expect(context.split(r'C:\path'), [r'C:', r'path']);
135 } 135 }
136 136
137 void test_suffix() { 137 void test_suffix() {
138 expect( 138 expect(
139 context.suffix(r'C:\root\path', r'C:\root\path\a\b.dart'), r'a\b.dart'); 139 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); 140 expect(context.suffix(r'C:\root\path', r'C:\root\other.dart'), isNull);
141 } 141 }
142 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698