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

Unified Diff: pkg/analyzer/test/src/summary/prelink_test.dart

Issue 1576173002: Handle setters properly in NameFilter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/prelink.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/prelink_test.dart
diff --git a/pkg/analyzer/test/src/summary/prelink_test.dart b/pkg/analyzer/test/src/summary/prelink_test.dart
index 5bb5347f3170c919ca6ca948fe2960f4ed3d6c45..b3a1ba0955d38934f47c58f754a5a4ccfde5765f 100644
--- a/pkg/analyzer/test/src/summary/prelink_test.dart
+++ b/pkg/analyzer/test/src/summary/prelink_test.dart
@@ -32,6 +32,24 @@ class MockUnlinkedCombinator implements UnlinkedCombinator {
@reflectiveTest
class NameFilterTest {
+ test_accepts_accessors_hide() {
+ NameFilter filter = new NameFilter.forCombinator(
+ new MockUnlinkedCombinator(hides: ['bar']));
+ expect(filter.accepts('foo'), isTrue);
+ expect(filter.accepts('foo='), isTrue);
+ expect(filter.accepts('bar'), isFalse);
+ expect(filter.accepts('bar='), isFalse);
+ }
+
+ test_accepts_accessors_show() {
+ NameFilter filter = new NameFilter.forCombinator(
+ new MockUnlinkedCombinator(shows: ['foo']));
+ expect(filter.accepts('foo'), isTrue);
+ expect(filter.accepts('foo='), isTrue);
+ expect(filter.accepts('bar'), isFalse);
+ expect(filter.accepts('bar='), isFalse);
+ }
+
test_forCombinator_hide() {
NameFilter filter = new NameFilter.forCombinator(
new MockUnlinkedCombinator(hides: ['foo', 'bar']));
« no previous file with comments | « pkg/analyzer/lib/src/summary/prelink.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698