Reorganize tests into named testsets and cover UDF value marshalling (#270)#351
Open
JohnCobbler wants to merge 2 commits into
Open
Reorganize tests into named testsets and cover UDF value marshalling (#270)#351JohnCobbler wants to merge 2 commits into
JohnCobbler wants to merge 2 commits into
Conversation
9401068 to
5c928b3
Compare
Pure reorg: wrap the flat test file in named @testset blocks with no assertion changes except aligning the strict Symbol-in-TEXT expectation with upstream JuliaDatabases#349 (multi-row type scan).
Add a dedicated testset for scalar UDF bind/round-trip coverage including Int64 boundaries, Float64, String, blob, and NULL.
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 #270.
The suite was one ~1000-line file with three coarse top-level testsets, so it was hard to see which setup belonged to which tests or what each group asserted. This restructures
test/runtests.jlinto named@testsetblocks grouped by functional area (DB open/close, tables interface, execute/query, transactions, load!/drop!, strict mode, UDF registration, serialization, backup, Stmt scope, …) under a single top-levelSQLitetestset. State-coupled blocks are kept together and annotated, and a couple of previously cross-test-shared tables are recreated locally so each testset stands alone.Commit 1 is a pure reorganization with zero semantic changes — no test added, removed, reordered across a state dependency, or weakened; assertion count unchanged and the suite still reports 181 passing tests.
Commit 2 adds a
UDF value marshallingtestset that round-trips values through a registered identity UDF and asserts exact equality. The Int64-boundary integer cases close a real coverage gap surfaced by mutation testing: nothing previously passed a UDF an integer outside the Int32 range, so the word-size branch insqlvaluecould be flipped to the 32-bit read path and silently truncate large integers with no failing test. The remaining cases cover the Float64, String (including multi-byte UTF-8), blob and NULL branches.