Skip to content

test: add tests for XS functions modified in PR #184#189

Merged
toddr merged 1 commit intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-issue-188
Mar 20, 2026
Merged

test: add tests for XS functions modified in PR #184#189
toddr merged 1 commit intocpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-issue-188

Conversation

@toddr-bot
Copy link
Copy Markdown
Collaborator

@toddr-bot toddr-bot commented Mar 20, 2026

Summary

Adds dedicated test coverage for XS functions modified in PR #184 (and related PR #186) to ensure the compile-warning fixes and PPCODE conversion changes continue to work correctly.

Fixes #188

Changes

  • t/error_string.t — Tests XML_ErrorString() which was converted from CODE/char* to PPCODE/void with XPUSHs (5 tests)
  • t/get_base.t — Tests XML_GetBase()/XML_SetBase() which were converted from CODE/SV* to PPCODE/void with XPUSHs (5 tests)
  • t/element_decl.t — Tests generate_model() including EMPTY and ANY content model types that received explicit switch cases in PR fix: handle XML_CTYPE_EMPTY/ANY in generate_model switch #186 (11 tests)

Test plan

  • All 3 new test files pass (21 tests total)
  • Full test suite passes: 46 files, 359 tests

Coverage analysis

Functions with existing sufficient test coverage (no new tests needed):

  • startElement() — removed unused variables; heavily tested across 8+ existing test files
  • externalEntityRef()(void)POPs cast; tested in external_ent.t, astress.t, g_void.t
  • unknownEncoding() — removed unused variable; tested via encoding.t
  • XML_ParseStream — removed unused variable; tested via stream.t and 3 other stream tests
  • XML_GetSpecifiedAttributeCount — declaration-only change; tested in defaulted.t

Generated by Kōan /fix


Quality Report

Changes: 3 files changed, 154 insertions(+)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

Add test coverage for XS functions changed in PR cpan-authors#184 and the related
PR cpan-authors#186:

- t/error_string.t: Tests XML_ErrorString() which was converted from
  CODE/char* to PPCODE/void with XPUSHs return semantics
- t/get_base.t: Tests XML_GetBase()/XML_SetBase() which were converted
  from CODE/SV* to PPCODE/void with XPUSHs return semantics
- t/element_decl.t: Tests generate_model() including EMPTY and ANY
  content model types that received explicit switch cases

Addresses cpan-authors#188

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@toddr toddr marked this pull request as ready for review March 20, 2026 17:38
@toddr toddr merged commit dd8932d into cpan-authors:main Mar 20, 2026
29 checks passed
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.

Assure testing for changed code

2 participants