Skip to content

[test] Fix error reporting and revert key events in test_glfw_events.c - #27597

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:fix_test_glfw_events
Aug 24, 2026
Merged

[test] Fix error reporting and revert key events in test_glfw_events.c#27597
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:fix_test_glfw_events

Conversation

@sbc100

@sbc100 sbc100 commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

In #22915 I inadvertently broke this test but it went unnoticed because
the error reporting was broken.

This change reverts test_glfw_events.c to use injectKeyEvent via
EM_ASM instead of trying to use fake_events.js (which is not flexible
enough yet for this test).

Also fix the error reporting and add test_success and test_fail
helpers the help keep it simple.

@sbc100
sbc100 requested a review from kripken August 22, 2026 19:31
In emscripten-core#22915 I inadvertently broke this test but it went unnoticed because
the error reporting was broken.

This change reverts `test_glfw_events.c` to use `injectKeyEvent` via
`EM_ASM` instead of trying to use `fake_events.js` (which is not flexible
enough yet for this test).

Also fix the error reporting and add `test_success` and `test_fail`
helpers the help keep it simple.
@sbc100
sbc100 force-pushed the fix_test_glfw_events branch from 688ea17 to 80a689b Compare August 22, 2026 22:57
@sbc100
sbc100 merged commit 510a745 into emscripten-core:main Aug 24, 2026
42 checks passed
@sbc100
sbc100 deleted the fix_test_glfw_events branch August 24, 2026 19:59
sbc100 added a commit that referenced this pull request Aug 25, 2026
Replace manual `g_state` bitmask failure tracking with direct `assert()`
checks in callbacks and the test runner loop.

Followup to  #27597
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