Skip to content

Fix Base64Test to validate narrow-byte decode output - #103

Merged
SergiusTheBest merged 2 commits into
mainfrom
copilot/fix-char-wchar-mismatch
Sep 11, 2026
Merged

SergiusTheBest merged 2 commits into
mainfrom
copilot/fix-char-wchar-mismatch

Conversation

Copilot AI commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Base64::decode returns decoded bytes, but the first Base64Test case was asserting against wchar_t/wstring_view. This updates the test to use char-based buffers and comparisons consistently with the API contract and the rest of the Base64 test coverage.

  • Test expectation alignment

    • Replace the VA== decode case’s wide-character buffer with a byte buffer.
    • Compare the decoded result as std::string_view instead of std::wstring_view.
  • Scope

    • Keep the change limited to test/Base64Test.cpp.
    • Do not modify Base64 implementation behavior.
constexpr std::string_view kExpectedOutput = "T";
std::array<char, kExpectedLength> output;

REQUIRE(std::string_view(output.data(), written) == kExpectedOutput);

Co-authored-by: SergiusTheBest <4660722+SergiusTheBest@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix char/wchar_t mismatch in Base64Test Fix Base64Test to validate narrow-byte decode output Sep 11, 2026
@SergiusTheBest
SergiusTheBest marked this pull request as ready for review September 11, 2026 12:38
@SergiusTheBest
SergiusTheBest merged commit 875b357 into main Sep 11, 2026
4 checks passed
@SergiusTheBest
SergiusTheBest deleted the copilot/fix-char-wchar-mismatch branch September 11, 2026 12:40
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.

Fix char/wchar_t mismatch in Base64Test

2 participants