Skip to content

Reorganize tests into named testsets and cover UDF value marshalling (#270)#351

Open
JohnCobbler wants to merge 2 commits into
JuliaDatabases:masterfrom
JohnCobbler:test/270-testset-reorg
Open

Reorganize tests into named testsets and cover UDF value marshalling (#270)#351
JohnCobbler wants to merge 2 commits into
JuliaDatabases:masterfrom
JohnCobbler:test/270-testset-reorg

Conversation

@JohnCobbler

Copy link
Copy Markdown

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.jl into named @testset blocks 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-level SQLite testset. 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 marshalling testset 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 in sqlvalue could 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.

@JohnCobbler JohnCobbler force-pushed the test/270-testset-reorg branch from 9401068 to 5c928b3 Compare June 25, 2026 10:13
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reorganize Tests into Testsets

1 participant