Add widechar ODBC call tests (driving Unicode fix)#290
Merged
irodushka merged 1 commit intoFirebirdSQL:masterfrom Apr 20, 2026
Merged
Add widechar ODBC call tests (driving Unicode fix)#290irodushka merged 1 commit intoFirebirdSQL:masterfrom
irodushka merged 1 commit intoFirebirdSQL:masterfrom
Conversation
…ectW / SQLPrepareW) Exercises both ConvertingString constructor paths in MainUnicode.cpp: output buffer (SQLGetDiagRecW / SQLErrorW) and input buffer (SQLExecDirectW / SQLPrepareW). Linux tests skip with a pointer to the follow-up Unicode rewrite PR; they are meant to drive that PR's implementation. Windows runs them for real. Per the plan in FirebirdSQL#289 comment 4279111183. Tracked as issue FirebirdSQL#287 Tier 1b.
This was referenced Apr 20, 2026
Contributor
|
Great job. |
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.
Summary
Adds a dedicated test file
tests/test_wide_errors.cppthat exercises bothConvertingStringconstructor scenarios inMainUnicode.cpp:SQLGetDiagRecW,SQLErrorW(usesConvertingString(length, sqlState)to widen the error text back to the caller's SQLWCHAR buffer).SQLExecDirectW,SQLPrepareW(usesConvertingString(connection, wcString, length)/convUnicodeToStringto narrow the caller's SQLWCHAR query into bytes).Why this PR exists (and why it's separate from #289)
Per @irodushka's plan in #289 (comment):
MainUnicode.cpprewrite and un-skip these tests on Linux.Linux behaviour (today)
Every test in the new file starts with:
SKIP_ON_LINUX_WIDECHAR();which is a
GTEST_SKIPwith a pointer to issue #287 Tier 1b. The pattern matches existing per-platform skips in tests/test_wchar.cpp:111 and tests/test_errors.cpp. This keeps Linux CI green; Windows runs them for real and they must pass. Removing the skip is the visible diff in the follow-up Unicode-fix PR.Test plan
SKIP_ON_LINUX_WIDECHAR()guards on Linux and confirm the tests fail the way we expect (truncation / overrun) — that's what makes them useful as driving tests for the follow-up PR.Related