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

Side by Side Diff: pkg/analyzer/test/src/summary/name_filter_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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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:analyzer/src/dart/element/element.dart'; 5 import 'package:analyzer/src/dart/element/element.dart';
6 import 'package:analyzer/src/summary/format.dart'; 6 import 'package:analyzer/src/summary/format.dart';
7 import 'package:analyzer/src/summary/name_filter.dart'; 7 import 'package:analyzer/src/summary/name_filter.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
12 main() { 11 main() {
13 groupSep = ' | '; 12 groupSep = ' | ';
14 runReflectiveTests(NameFilterTest); 13 defineReflectiveTests(NameFilterTest);
15 } 14 }
16 15
17 @reflectiveTest 16 @reflectiveTest
18 class NameFilterTest { 17 class NameFilterTest {
19 test_accepts_accessors_hide() { 18 test_accepts_accessors_hide() {
20 NameFilter filter = new NameFilter.forUnlinkedCombinator( 19 NameFilter filter = new NameFilter.forUnlinkedCombinator(
21 new UnlinkedCombinatorBuilder(hides: ['bar'])); 20 new UnlinkedCombinatorBuilder(hides: ['bar']));
22 expect(filter.accepts('foo'), isTrue); 21 expect(filter.accepts('foo'), isTrue);
23 expect(filter.accepts('foo='), isTrue); 22 expect(filter.accepts('foo='), isTrue);
24 expect(filter.accepts('bar'), isFalse); 23 expect(filter.accepts('bar'), isFalse);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 .merge(new NameFilter.forUnlinkedCombinator( 224 .merge(new NameFilter.forUnlinkedCombinator(
226 new UnlinkedCombinatorBuilder(shows: ['bar']))); 225 new UnlinkedCombinatorBuilder(shows: ['bar'])));
227 expect(filter.accepts('foo'), isFalse); 226 expect(filter.accepts('foo'), isFalse);
228 expect(filter.accepts('bar'), isFalse); 227 expect(filter.accepts('bar'), isFalse);
229 expect(filter.accepts('baz'), isFalse); 228 expect(filter.accepts('baz'), isFalse);
230 expect(filter.hiddenNames, isNull); 229 expect(filter.hiddenNames, isNull);
231 expect(filter.shownNames, isNotNull); 230 expect(filter.shownNames, isNotNull);
232 expect(filter.shownNames, isEmpty); 231 expect(filter.shownNames, isEmpty);
233 } 232 }
234 } 233 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698