Skip to content

18 shadow tests added, all 648 tests pass#447

Closed
github-actions[bot] wants to merge 1 commit intodevfrom
opencode/schedule-2a5273-20260411052204
Closed

18 shadow tests added, all 648 tests pass#447
github-actions[bot] wants to merge 1 commit intodevfrom
opencode/schedule-2a5273-20260411052204

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Done. Created src/engine/graphics/shadow_tests.zig with 18 tests covering:

Tests Added:

  • ShadowCascades.initZero creates identity matrices and zero arrays
  • ShadowCascades.isValid returns true for properly initialized cascades
  • ShadowCascades.isValid returns false for non-increasing splits
  • ShadowCascades.isValid returns false for non-positive texel size
  • ShadowCascades.isValid returns false for NaN in splits
  • ShadowCascades.isValid returns false for NaN in texel sizes
  • computeCascades returns zero cascades for resolution == 0
  • computeCascades returns zero cascades for far <= near
  • computeCascades returns zero cascades for near <= 0
  • computeCascades uses fixed splits for large shadow distance (>500)
  • computeCascades uses logarithmic splits for small shadow distance (<=500)
  • ShadowConfig default values
  • ShadowParams struct layout and defaults
  • IShadowScene interface delegation
  • CASCADE_COUNT is 4
  • getShadowMapHandle returns 0 for out-of-bounds cascade index
  • validateCascades returns true for valid cascades
  • validateCascades returns false for invalid cascades

All 648 tests pass. The warning "Invalid shadow cascade data detected:" is expected behavior from validateCascades when testing with invalid input.

Triggered by scheduled workflow

New%20session%20-%202026-04-11T05%3A22%3A03.942Z
opencode session  |  github run

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