Skip to content

Comments

Add 69 tests covering previously untested transpiler features#30

Merged
associate-1 merged 1 commit intomainfrom
test/expand-test-coverage
Feb 20, 2026
Merged

Add 69 tests covering previously untested transpiler features#30
associate-1 merged 1 commit intomainfrom
test/expand-test-coverage

Conversation

@associate-1
Copy link
Member

Summary

  • Systematic gap analysis of implemented features vs existing test coverage identified 10+ feature areas with zero or near-zero tests
  • Adds 54 new e2e tests across 5 new test files and 15 new lexer unit tests, bringing the total from ~289 to ~358
  • All new tests pass alongside the full existing suite

New test coverage

File Tests Covers
e2e_intrinsics_test.go 13 LONGPROD, LONGDIV, LONGSUM, LONGDIFF, NORMALISE, SHIFTRIGHT, SHIFTLEFT
e2e_retypes_test.go 6 VAL INT RETYPES (float32→int), VAL [2]INT RETYPES (float64→int pair), same-name shadowing
e2e_params_test.go 6 RESULT qualifier, fixed-size array params, shared-type params, VAL []BYTE with string arg
e2e_strings_test.go 5 VAL []BYTE abbreviation, print.string, print.newline, string escapes
e2e_misc_test.go 24 SKIP, STOP, modulo, ALT boolean guards, MOSTNEG/MOSTPOS REAL32/REAL64, shorthand slice, Go reserved word escaping, multi-line expressions, recursive functions, go vet cleanness, and more
lexer_test2_test.go 15 All 33+ keywords, paren/bracket depth suppression, continuation operators, string/byte literals, send/receive/ampersand/semicolon tokens, line/column tracking

See TEST_COVERAGE_IMPROVEMENTS.md for the full detailed breakdown.

Test plan

  • go test ./... passes (all 358 tests)
  • No changes to production code — tests only
  • Each previously-untested feature now has at least one e2e test verifying transpile → compile → run → correct output

🤖 Generated with Claude Code

Systematic gap analysis identified several implemented features with zero
or near-zero test coverage. This adds e2e and lexer tests for: transputer
intrinsics (LONGPROD, LONGDIV, LONGSUM, LONGDIFF, NORMALISE, SHIFTRIGHT,
SHIFTLEFT), RETYPES bit reinterpretation, RESULT qualifier params,
fixed-size array params, shared-type params, VAL []BYTE abbreviation,
print.string/print.newline, ALT with boolean guards, MOSTNEG/MOSTPOS for
REAL32/REAL64, modulo operator, SKIP/STOP, string-to-[]byte wrapping, Go
reserved word escaping, multi-line expressions, and lexer paren/bracket
depth suppression.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@associate-1 associate-1 merged commit d21963b into main Feb 20, 2026
1 check 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.

2 participants