diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-10-22 13:32:01 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-10-22 13:32:17 +0100 |
| commit | f3bcdfe21627f64c11abda54596eb1388caa74e7 (patch) | |
| tree | 7608ee3c1d03272fc4b7ebf1477c51b1600ac1e4 /src/test/java/org/shedlang/compiler/ast | |
| parent | 296fa6ee9ee63089603c8bb13bb7d3346f85a037 (diff) | |
Add visibility for structs
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))); + } } |
