Skip to content

Commit a3b0296

Browse files
committed
TestSuite: amend "widgets_text_null" for ImDrawList::AddText().
ocornut/imgui#7391
1 parent cd1c6ce commit a3b0296

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

imgui_test_suite/imgui_tests_widgets.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -2889,7 +2889,7 @@ void RegisterTests_Widgets(ImGuiTestEngine* e)
28892889
#endif
28902890

28912891
#if IMGUI_VERSION_NUM >= 18408
2892-
// ## Test null range in TextUnformatted() (#3615)
2892+
// ## Test null range in TextUnformatted() (#3615, #7391)
28932893
t = IM_REGISTER_TEST(e, "widgets", "widgets_text_null");
28942894
t->GuiFunc = [](ImGuiTestContext* ctx)
28952895
{
@@ -2910,6 +2910,13 @@ void RegisterTests_Widgets(ImGuiTestEngine* e)
29102910
ImVec2 p1 = ImGui::GetCursorScreenPos();
29112911
IM_CHECK_EQ(p0, p1);
29122912
}
2913+
#if IMGUI_VERSION_NUM >= 19047
2914+
{
2915+
ImVec2 p0 = ImGui::GetCursorScreenPos();
2916+
ImGui::GetWindowDrawList()->AddText(p0, ImGui::GetColorU32(ImGuiCol_Text), str + 1, str + 1);
2917+
ImGui::GetWindowDrawList()->AddText(p0, ImGui::GetColorU32(ImGuiCol_Text), NULL, NULL);
2918+
}
2919+
#endif
29132920
ImGui::End();
29142921
};
29152922
#endif

0 commit comments

Comments
 (0)