summaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedQueryExpressionReferenceNodeMatcher.java47
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedReferenceNodeMatcher.java47
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserReferenceTests.java (renamed from src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserQueryExpressionReferenceTests.java)8
3 files changed, 51 insertions, 51 deletions
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedQueryExpressionReferenceNodeMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedQueryExpressionReferenceNodeMatcher.java
deleted file mode 100644
index 3e4dd49..0000000
--- a/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedQueryExpressionReferenceNodeMatcher.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Generated by hobgoblin.
-
-package org.zwobble.hobgoblin.compiler.ast.untyped;
-
-// Custom area start: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher imports
-// Custom area end: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher imports
-
-public final class UntypedQueryExpressionReferenceNodeMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
- public static org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher isUntypedQueryExpressionReferenceNode() {
- return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher(java.util.List.of());
- }
-
- private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNode>> submatchers;
-
- private UntypedQueryExpressionReferenceNodeMatcher(
- java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNode>> submatchers
- ) {
- this.submatchers = submatchers;
- }
-
- public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
- return this.toMatcher().match(actual);
- }
-
- public org.zwobble.precisely.TextTree describe() {
- return this.toMatcher().describe();
- }
-
- private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
- return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNode.class, this.submatchers);
- }
-
- public org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher withName(org.zwobble.precisely.Matcher<? super String> name) {
- var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNode>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNode::name, (org.zwobble.precisely.Matcher) name));
- return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher(submatchers);
- }
-
- public org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher withSource(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.sources.Source> source) {
- var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNode>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("source", org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNode::source, (org.zwobble.precisely.Matcher) source));
- return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher(submatchers);
- }
-
- // Custom area start: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher body
- // Custom area end: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher body
-}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedReferenceNodeMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedReferenceNodeMatcher.java
new file mode 100644
index 0000000..311f24d
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/ast/untyped/UntypedReferenceNodeMatcher.java
@@ -0,0 +1,47 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.ast.untyped;
+
+// Custom area start: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher imports
+// Custom area end: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher imports
+
+public final class UntypedReferenceNodeMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher isUntypedReferenceNode() {
+ return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNode>> submatchers;
+
+ private UntypedReferenceNodeMatcher(
+ java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNode>> submatchers
+ ) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNode.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher withName(org.zwobble.precisely.Matcher<? super String> name) {
+ var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNode>>(this.submatchers);
+ submatchers.add(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNode::name, (org.zwobble.precisely.Matcher) name));
+ return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher(submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher withSource(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.sources.Source> source) {
+ var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNode>>(this.submatchers);
+ submatchers.add(org.zwobble.precisely.Matchers.has("source", org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNode::source, (org.zwobble.precisely.Matcher) source));
+ return new org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher(submatchers);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserQueryExpressionReferenceTests.java b/src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserReferenceTests.java
index bc911dc..8a390c6 100644
--- a/src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserQueryExpressionReferenceTests.java
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/parser/ParserReferenceTests.java
@@ -2,19 +2,19 @@ package org.zwobble.hobgoblin.compiler.parser;
import org.junit.jupiter.api.Test;
-import static org.zwobble.hobgoblin.compiler.ast.untyped.UntypedQueryExpressionReferenceNodeMatcher.isUntypedQueryExpressionReferenceNode;
+import static org.zwobble.hobgoblin.compiler.ast.untyped.UntypedReferenceNodeMatcher.isUntypedReferenceNode;
import static org.zwobble.hobgoblin.compiler.parser.ParserTesting.parseString;
import static org.zwobble.precisely.AssertThat.assertThat;
import static org.zwobble.precisely.Matchers.equalTo;
-public class ParserQueryExpressionReferenceTests {
+public class ParserReferenceTests {
@Test
public void canParseReference() {
var source = "authors";
- var node = parseString(source, Parser::parseQueryExpression);
+ var node = parseString(source, Parser::parseExpression);
- assertThat(node, isUntypedQueryExpressionReferenceNode()
+ assertThat(node, isUntypedReferenceNode()
.withName(equalTo("authors"))
);
}