ocornut / imgui_test_engine

Dear ImGui Automation Engine & Test Suite
386 stars 40 forks source link

WindowInfo() with ImGuiTestOpFlags_NoError for missing window still sets error status #52

Closed pezcode closed 3 weeks ago

pezcode commented 4 weeks ago

I would expect this to not set the test status to Error.

From a quick glance it looks like WindowInfo() doesn't pass the flags parameter on to ItemInfo(): https://github.com/ocornut/imgui_test_engine/blob/6c8a301b8500a582cb73d5b50d43926b0a85ad69/imgui_test_engine/imgui_te_context.cpp#L1233

ocornut commented 3 weeks ago

Can you clarify your context and call site? I can't think of how ItemInfo(window->ID) would error given we already have a window pointer and a valid ID. However, the function does output message stating "error: xxx" to log without setting the test status, which is misleading.

pezcode commented 3 weeks ago

So, I went back to reproduce this since we've since added a "workaround" and then also upgraded versions. Turns out I misremembered - we were calling it without ImGuiTestOpFlags_NoError and I incorrectly assumed it shouldn't set the error status because the return value can be empty.

Everything works as intended, sorry for the noise 🙈