Skip to content

test(compiler): cover unsigned shifts and notZero at runtime - #1114

Merged
andorthehood merged 1 commit into
8f4e:mainfrom
jinchuntan:test/native-instruction-coverage
Oct 22, 2026
Merged

andorthehood merged 1 commit into
8f4e:mainfrom
jinchuntan:test/native-instruction-coverage

Conversation

@jinchuntan

Copy link
Copy Markdown
Contributor

Closes #1110.
Closes #1112.

Adds native TestRuntime fixtures and compile-result snapshots for both instructions.

  • shiftRightUnsigned: positive shifts, zero, sign-bit handling and shift-count masking.
  • notZero: zero and nonzero integers, float32 and float64 values, including negative zero and a tiny float64 value. All expected results are integer 0 or 1.

Validated on Node 24.16.0:

npx nx run @8f4e/compiler:test --update

All 371 compiler tests passed, including the 17 new native assertions.

Add TestRuntime fixtures and compile-result snapshots for unsigned right
shifts and notZero across integer, float32 and float64 values. Exercise
sign-bit handling, shift-count masking, signed zeros and a tiny float64 value.
@irimias57 irimias57 added contributor compiler Compiler, tokenizer, codegen, and language-semantics work labels Oct 19, 2026

@irimias57 irimias57 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, @jinchuntan! The 17 native assertions cover both issues' requirements, including unsigned shift behavior and integer, float32, and float64 notZero results. I found no actionable issues. All 371 compiler tests and the package type check passed locally without updating snapshots.

@andorthehood andorthehood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@andorthehood
andorthehood merged commit 8e87493 into 8f4e:main Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler Compiler, tokenizer, codegen, and language-semantics work contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add executable coverage for notZero Add executable coverage for shiftRightUnsigned

3 participants