spmallette commented on code in PR #3091:
URL: https://github.com/apache/tinkerpop/pull/3091#discussion_r2033980029
##########
gremlin-language/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/ReferenceGrammarTest.java:
##########
@@ -89,29 +94,73 @@ public class ReferenceGrammarTest extends
AbstractGrammarTest {
}};
@Parameterized.Parameters(name = "{0}")
- public static Iterable<String> queries() throws IOException {
- final Set<String> gremlins = new
LinkedHashSet<>(DocumentationReader.parse(docsDir));
- gremlins.addAll(FeatureReader.parseGrouped(featureDir,
stringMatcherConverters).values().stream().flatMap(Collection::stream).collect(Collectors.toList()));
- return gremlins;
+ public static Iterable<Pair<String, ParserRule>> parseTestItems() throws
IOException {
+ // gremlin scripts from docs
+ final Set<Pair<String, ParserRule>> scripts =
DocumentationReader.parse(docsDir).
+ stream().map(g -> Pair.with(g, ParserRule.QUERY_LIST)).
+ collect(Collectors.toCollection(LinkedHashSet::new));
+
+ // helps make sure we're actually adding test scripts for each load.
there are well over 500 gremlin
+ // examples in the docs so we should have at least that much
+ int size = scripts.size();
+ assert size > 500;
Review Comment:
yep - making sure scripts increment in size is not what this test is about.
the java asserts simply validate that our test is setup as we expect it to be.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]