Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/tests/progress.c:
+ todo_wine ok(state == PBST_PAUSED, "Expected %d (PBST_PAUSED), but got %d\n", PBST_PAUSED, state); + + /* Check for error state */ + state = SendMessageA(progress_bar, PBM_SETSTATE, PBST_ERROR, 0); + todo_wine ok(state == PBST_PAUSED, "Expected %d (PBST_PAUSED), but got %d\n", PBST_PAUSED, state); + state = SendMessageA(progress_bar, PBM_GETSTATE, 0, 0); + todo_wine ok(state == PBST_ERROR, "Expected %d (PBST_ERROR), but got %d\n", PBST_ERROR, state); + + /* Check bad state */ + state = SendMessageA(progress_bar, PBM_SETSTATE, 0, 0); + todo_wine ok(state == 0, "Expected 0, but got %d\n", state); + state = SendMessageA(progress_bar, PBM_GETSTATE, 0, 0); + todo_wine ok(state == PBST_ERROR, "Expected %d (PBST_ERROR), but got %d\n", PBST_ERROR, state); + + /* Check setting current state */ + state = SendMessageA(progress_bar, PBM_SETSTATE, PBST_ERROR, 0); There is also the PBFS_PARTIAL state. So please add tests for it and implement it as well.
Also, using a loop with static test data to test these states should be easier. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6186#note_77657