`==` has higher precedence than `?:`, meaning that a test like `ok(hr == (i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, ...)` is parsed as `(hr == (i < 4)) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED` and not the intended `hr == ((i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED)`. I discovered this when converting `wine/test.h` to use `bool` for conditions (MR coming soon), this generated warnings like: ``` ../dlls/amstream/tests/amstream.c: In function 'test_media_types': ../dlls/amstream/tests/amstream.c:3159:33: warning: '?:' using integer constants in boolean context [-Wint-in-bool-context] 3159 | ok(hr == (i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx on ReceiveConnection for subtype %s.\n", hr, ../include/wine/test.h:388:53: note: in definition of macro 'winetest_ok' 388 | #define winetest_ok(cond, ...) (winetest_should_log(cond) ? winetest_ok_(__VA_ARGS__) : winetest_ok_(NULL)) | ^~~~ ../include/wine/test.h:129:18: note: in expansion of macro 'ok_' 129 | #define ok ok_(__FILE__, __LINE__) | ^~~ ../dlls/amstream/tests/amstream.c:3159:9: note: in expansion of macro 'ok' 3159 | ok(hr == (i < 4) ? S_OK : VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx on ReceiveConnection for subtype %s.\n", hr, ``` -- v5: tests: Fix tests that are faulty because of == vs ?: operator precedence. https://gitlab.winehq.org/wine/wine/-/merge_requests/11566