test(path): cover Optional and Or iterator behavior (#238) - #991
Open
JSap0914 wants to merge 1 commit into
Open
Conversation
Adds narrowly scoped integration coverage in the shared path test set (exercised by every quadstore backend) for behaviors that were previously untested, addressing the low iterator coverage noted in cayleygraph#238: - Or union of overlapping branches (no deduplication) - Or preserving the Save tag of whichever branch produced a value - SaveOptional keeping unmatched starts with an empty tag - Optional branch that never matches still returning every top-level node Also adds myself to CONTRIBUTORS per CONTRIBUTING guidance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #238
What
Adds narrowly scoped integration coverage for the
OptionalandOriterators, addressing the low iterator coverage noted in #238. The new cases live in the shared path test set (query/path/pathtest), which is executed against every quadstore backend, so the coverage applies broadly rather than to a single store.Why
#238 observes that the base iterators are under-covered by the integration tests, specifically the
OptionalandOriterators. The most maintainable place to exercise these end-to-end today is the sharedtestSetinquery/path/pathtest, driven viaSave/SaveOptional/Optional/Oron the query path (the modern equivalent of the old top-level integration queries the issue refers to).Coverage added
Against the standard
data/testdata.nqgraph:alice->followsanddani->followsboth reachbob; documents thatOris a union without deduplication (bobappears from each branch).Savetag of the producing branch — a value keeps the tag set by whicheverOrbranch produced it.SaveOptionalkeeps unmatched starts with an empty tag — starts without a matching quad survive with an empty tag while matched ones carry the value.Optionalbranch that never matches — every top-level node is still returned when the optional sub-path matches nothing.Each case runs in both optimized and unoptimized iterator modes (the existing harness runs both), so the assertions pin behavior across optimization.
Verification
No production code changes; test-only plus a CONTRIBUTORS entry per the project's CONTRIBUTING guidance.
Refs #238
This change is