Skip to content

test: Compare video tick edges by their enum names - #2451

Merged
zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:fix/video-tick-test-msvc
Oct 26, 2026
Merged

zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:fix/video-tick-test-msvc

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Refs #2443

What and why

The steps test from #2448 (the video tick port) doesn't build on Windows. MSVC raises warning C5287, which is an error under -WX, at test/cmocka/test_source_video_tick_steps.c:237. That line compares an enum obs_source_video_tick_edge with the test's unnamed-enum aliases ON/OFF. It breaks the Windows Tier 2 build of any PR that builds the cmocka tests (seen on #2450).

Change

Line 237 compares against OBS_SOURCE_VIDEO_TICK_EDGE_ON and OBS_SOURCE_VIDEO_TICK_EDGE_OFF directly. No assertion changes. The assert_int_equal uses of the aliases convert to integers and are fine.

Testing

  • ./lint: ok.
  • Windows Tier 2 in this PR's CI builds the file.

MSVC (warning C5287 as error) rejects comparing the edge with the
test's unnamed-enum aliases. Use OBS_SOURCE_VIDEO_TICK_EDGE_ON and
_OFF directly.

Refs obs-rust#2443
@zackees

zackees commented Oct 26, 2026

Copy link
Copy Markdown
Member

Coordinator review: a compile-only fix for MSVC C5287 under -WX. It names the enum constants instead of the unnamed-enum aliases, so the condition and every assertion are unchanged. This test came from #2448 a few hours ago, and it blocks Windows Tier 2 for every PR that builds cmocka (#2450 included). Queuing.

@zackees
zackees enabled auto-merge October 26, 2026 06:52
@zackees
zackees added this pull request to the merge queue Oct 26, 2026
Merged via the queue into obs-rust:master with commit 96a2393 Oct 26, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants