test(cli): add cross-impl parity tests for C90 & C++20 kb20 refs #14

Merged
sezieru merged 1 commit from test/cli/c-parity/sh into main 2025-11-05 08:52:23 +00:00
Owner

What

Introduces a shell-based parity test that cross-checks the C90 reference (src/c/kb20-c90ref) and the new C++20 reference (src/cpp/kb20-cpp20ref).

Coverage

  • Text-mode roundtrip C→C++ and C++→C
  • Custom alphabets:
    • ZERO override (e.g., Kaktovik U+1D2C0 baseline)
    • Full 20-scalar alphabet map
  • Binary-digits (--bin) mode with random payloads; compares exact bytes
  • Boundary sizes at 4/5/6/9/10/11 bytes

Why

Ensures on-wire compatibility and guards against regressions between the C and C++ implementations.

Usage

make -C src/c
make -C src/cpp
tests/test_kb20.sh "Sample text to encode"

# or: echo "..." | tests/test_kb20.sh
### What Introduces a shell-based parity test that cross-checks the C90 reference (src/c/kb20-c90ref) and the new C++20 reference (src/cpp/kb20-cpp20ref). ### Coverage - Text-mode roundtrip C→C++ and C++→C - Custom alphabets: - ZERO override (e.g., Kaktovik U+1D2C0 baseline) - Full 20-scalar alphabet map - Binary-digits (--bin) mode with random payloads; compares exact bytes - Boundary sizes at 4/5/6/9/10/11 bytes ### Why Ensures on-wire compatibility and guards against regressions between the C and C++ implementations. ### Usage ```shell make -C src/c make -C src/cpp tests/test_kb20.sh "Sample text to encode" # or: echo "..." | tests/test_kb20.sh ```
sezieru self-assigned this 2025-11-05 08:52:14 +00:00
- Cross-validate encode/decode across C90 & C++20 refs
- Test custom alphabets (ZERO and full map)
- Exercise --bin (digits-wire) with random payloads
- Include small boundary-size checks (4,5,6,9,10,11 bytes)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: fosster/libb20#14
No description provided.