diff options
Diffstat (limited to 'src/test/java/org/shedlang/compiler/ast')
| -rw-r--r-- | src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java b/src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java index 5a73f49b..98bb535f 100644 --- a/src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java +++ b/src/test/java/org/shedlang/compiler/ast/untyped/UntypedStructDefinitionNodeMatcher.java @@ -2,6 +2,7 @@ package org.shedlang.compiler.ast.untyped; import org.pcollections.PVector; import org.shedlang.compiler.testing.MatcherBuilder; +import org.shedlang.compiler.types.Visibility; import org.shedlang.compiler.util.P; import org.zwobble.precisely.Matcher; @@ -34,4 +35,8 @@ public class UntypedStructDefinitionNodeMatcher extends MatcherBuilder<UntypedNa public UntypedStructDefinitionNodeMatcher withFields(Matcher<Iterable<? extends UntypedStructFieldDefinitionNode>> fields) { return with(has("fields", x -> x.fields(), fields)); } + + public UntypedStructDefinitionNodeMatcher withVisibility(Visibility visibility) { + return with(has("visibility", x -> x.visibility(), equalTo(visibility))); + } } |
