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

Side by Side Diff: pkg/analyzer/test/src/util/glob_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.glob_test; 5 library analyzer.test.src.util.glob_test;
6 6
7 import 'package:analyzer/src/util/glob.dart'; 7 import 'package:analyzer/src/util/glob.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(GlobPosixTest); 15 defineReflectiveTests(GlobPosixTest);
16 runReflectiveTests(GlobWindowsTest); 16 defineReflectiveTests(GlobWindowsTest);
17 } 17 }
18 18
19 @reflectiveTest 19 @reflectiveTest
20 class GlobPosixTest { 20 class GlobPosixTest {
21 void test_case() { 21 void test_case() {
22 Glob glob = new Glob(r'\', r'**.DaRt'); 22 Glob glob = new Glob(r'\', r'**.DaRt');
23 expect(glob.matches(r'aaa.dart'), isTrue); 23 expect(glob.matches(r'aaa.dart'), isTrue);
24 expect(glob.matches(r'bbb.DART'), isTrue); 24 expect(glob.matches(r'bbb.DART'), isTrue);
25 expect(glob.matches(r'ccc.dArT'), isTrue); 25 expect(glob.matches(r'ccc.dArT'), isTrue);
26 expect(glob.matches(r'ddd.DaRt'), isTrue); 26 expect(glob.matches(r'ddd.DaRt'), isTrue);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 void test_starStar() { 124 void test_starStar() {
125 Glob glob = new Glob(r'\', r'**.dart'); 125 Glob glob = new Glob(r'\', r'**.dart');
126 expect(glob.matches(r'foo\bar.dart'), isTrue); 126 expect(glob.matches(r'foo\bar.dart'), isTrue);
127 expect(glob.matches(r'foo\bar\baz.dart'), isTrue); 127 expect(glob.matches(r'foo\bar\baz.dart'), isTrue);
128 expect(glob.matches(r'C:\foo\bar.dart'), isTrue); 128 expect(glob.matches(r'C:\foo\bar.dart'), isTrue);
129 expect(glob.matches(r'C:\foo\bar\baz.dart'), isTrue); 129 expect(glob.matches(r'C:\foo\bar\baz.dart'), isTrue);
130 // does not end with 'dart' 130 // does not end with 'dart'
131 expect(glob.matches(r'C:\web\foo.html'), isFalse); 131 expect(glob.matches(r'C:\web\foo.html'), isFalse);
132 } 132 }
133 } 133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698