summaryrefslogtreecommitdiff
path: root/src/test/java/org/zwobble
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/zwobble')
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNativeTypeDefinitionNodeMatcher.java2
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserNativeTypeDefinitionTests.java10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNativeTypeDefinitionNodeMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNativeTypeDefinitionNodeMatcher.java
index e1f02a0..3105dae 100644
--- a/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNativeTypeDefinitionNodeMatcher.java
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedNativeTypeDefinitionNodeMatcher.java
@@ -36,7 +36,7 @@ public final class UntypedNativeTypeDefinitionNodeMatcher implements org.zwobble
return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNativeTypeDefinitionNodeMatcher(submatchers);
}
- public org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNativeTypeDefinitionNodeMatcher withTypeParams(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.ast.untyped.UntypedTypeParamNode>> typeParams) {
+ public org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNativeTypeDefinitionNodeMatcher withTypeParams(org.zwobble.precisely.Matcher<? super java.util.Optional<java.util.List<org.zwobble.hobgoblin.compiler.ast.untyped.UntypedTypeParamNode>>> typeParams) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNativeTypeDefinitionNode>>(this.submatchers);
submatchers.add(org.zwobble.precisely.Matchers.has("typeParams", org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNativeTypeDefinitionNode::typeParams, typeParams));
return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedNativeTypeDefinitionNodeMatcher(submatchers);
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserNativeTypeDefinitionTests.java b/src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserNativeTypeDefinitionTests.java
index ca0a71d..444b392 100644
--- a/src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserNativeTypeDefinitionTests.java
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserNativeTypeDefinitionTests.java
@@ -39,7 +39,7 @@ public class ParserNativeTypeDefinitionTests {
);
assertThat(node, isUntypedNativeTypeDefinitionNode()
- .withTypeParams(isSequence())
+ .withTypeParams(isOptionalEmpty())
);
}
@@ -55,9 +55,9 @@ public class ParserNativeTypeDefinitionTests {
);
assertThat(node, isUntypedNativeTypeDefinitionNode()
- .withTypeParams(isSequence(
+ .withTypeParams(isOptionalOf(isSequence(
isUntypedTypeParamNode().withName(equalTo("TPoint"))
- ))
+ )))
);
}
@@ -73,10 +73,10 @@ public class ParserNativeTypeDefinitionTests {
);
assertThat(node, isUntypedNativeTypeDefinitionNode()
- .withTypeParams(isSequence(
+ .withTypeParams(isOptionalOf(isSequence(
isUntypedTypeParamNode().withName(equalTo("K")),
isUntypedTypeParamNode().withName(equalTo("V"))
- ))
+ )))
);
}
}