Skip to content

test: Add byte typed-array array unmarshal coverage#49

Merged
siyul-park merged 1 commit into
mainfrom
codex/test-gap-byte-array-unmarshal
Jun 4, 2026
Merged

test: Add byte typed-array array unmarshal coverage#49
siyul-park merged 1 commit into
mainfrom
codex/test-gap-byte-array-unmarshal

Conversation

@siyul-park

Copy link
Copy Markdown
Owner

Summary

  • add fixed-array unmarshal coverage for the recent TypedArray[int8] path in interp/marshal.go
  • verify byte and int8 array decoding from types.TypedArray[int8]
  • verify fixed-array length mismatches return ErrValueOverflow

Changed Paths Tested

  • interp/marshal.go: unmarshalArray fast path for TypedArray[int8] into [N]byte and [N]int8

Added Tests

  • TestInterpreter_Unmarshal/array in interp/interp_test.go
    • [3]byte decodes 0x00, 0x7F, -1 as 0x00, 0x7F, 0xFF
    • [2]int8 preserves signed bytes
    • mismatched fixed-array length returns ErrValueOverflow

Validation

  • go test ./interp -run TestInterpreter_Unmarshal

Skipped Targets

  • interp/marshal.go slice fast path: already covered by existing []byte and []int8 unmarshal tests in TestInterpreter_Unmarshal/slice
  • broader typed-array interpreter ops: already covered by the i8 opcode tests added with the feature commit in TestInterpreter_Run

@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.53%. Comparing base (18605ad) to head (60758e2).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   54.34%   54.53%   +0.18%     
==========================================
  Files          56       56              
  Lines       10718    10718              
==========================================
+ Hits         5825     5845      +20     
+ Misses       4235     4214      -21     
- Partials      658      659       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siyul-park siyul-park marked this pull request as ready for review June 2, 2026 09:43
@siyul-park siyul-park changed the title [codex] Add byte typed-array array unmarshal coverage test: Add byte typed-array array unmarshal coverage Jun 4, 2026
@siyul-park siyul-park merged commit 6104a9a into main Jun 4, 2026
5 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.

1 participant