Skip to content

Commit fc6b063

Browse files
committed
TestSuite: amends for latest.
1 parent 0daaaec commit fc6b063

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Diff for: imgui_test_suite/imgui_tests_viewports.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ static inline bool operator!=(const ImVec2& lhs, const ImVec2& rhs) { return lhs
3030
// - Even if we don't implement the test right away: they allow us to remember edge cases and interesting things to test.
3131
// - Even if they will be hard to actually implement/automate, they still allow us to manually check things.
3232
//-------------------------------------------------------------------------
33+
// TODO: Run test suite with negative coordinates viewports, as it is a frequent code for issues!
3334
// TODO: Tests: Viewport: host A, viewport B over A, make new Modal appears where geometry overlap A -> SHOULD APPEAR OVER B
3435
// TODO: Tests: Viewport: host A, viewport B over A, window C with TopMost, move over host A (may be merged) then drag over B -> SHOULD APPEAR OVER B AKA NOT MERGE IN A, OR, UNMERGE FROM A
3536
// Actually same test is meaningful even without TopMost flag, since clicking C supposedly should bring it to front, C merged in A and dragging around B should appear over B

Diff for: imgui_test_suite/imgui_tests_widgets.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ void RegisterTests_Widgets(ImGuiTestEngine* e)
440440
for (int data_type = 0; data_type < ImGuiDataType_COUNT; data_type++)
441441
{
442442
#if IMGUI_VERSION_NUM >= 19094
443-
if (data_type == ImGuiDataType_Bool)
443+
if (data_type == ImGuiDataType_Bool || data_type == ImGuiDataType_String)
444444
continue;
445445
#endif
446446
size_t data_size = ImGui::DataTypeGetInfo(data_type)->Size;
@@ -5285,7 +5285,7 @@ void RegisterTests_Widgets(ImGuiTestEngine* e)
52855285
for (ImGuiDataType data_type = 0; data_type < ImGuiDataType_COUNT; data_type++)
52865286
{
52875287
#if IMGUI_VERSION_NUM >= 19094
5288-
if (data_type == ImGuiDataType_Bool)
5288+
if (data_type == ImGuiDataType_Bool || data_type == ImGuiDataType_String)
52895289
continue;
52905290
#endif
52915291
const ImGuiDataTypeInfo* data_type_info = ImGui::DataTypeGetInfo(data_type);
@@ -5320,7 +5320,7 @@ void RegisterTests_Widgets(ImGuiTestEngine* e)
53205320
for (int data_type = 0; data_type < ImGuiDataType_COUNT; data_type++)
53215321
{
53225322
#if IMGUI_VERSION_NUM >= 19094
5323-
if (data_type == ImGuiDataType_Bool)
5323+
if (data_type == ImGuiDataType_Bool || data_type == ImGuiDataType_String)
53245324
continue;
53255325
#endif
53265326
for (int invert_range = 0; invert_range < 2; invert_range++)

Diff for: shared/imgui_app.cpp

+9-10
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Index of this file:
5555
// [SECTION] ImGuiApp Implementation: SDL + OpenGL3
5656
// [SECTION] ImGuiApp Implementation: GLFW + OpenGL3
5757
// [SECTION] ImGuiApp Implementation: OpenGL (Shared)
58+
// [SECTION] Mock backend for multi-viewports (Shared): The viewports are not visible
5859
5960
*/
6061

@@ -120,7 +121,7 @@ bool ImGuiApp_ScreenCaptureFunc(ImGuiID viewport_id, int x, int y, int w, int h,
120121
//-----------------------------------------------------------------------------
121122

122123
#ifdef IMGUI_HAS_VIEWPORT
123-
static void ImGuiApp_InstalMockViewportsBackend(ImGuiApp*);
124+
static void ImGuiApp_InstallMockViewportsBackend(ImGuiApp*);
124125
#endif
125126

126127
// Data
@@ -135,7 +136,7 @@ static void ImGuiApp_ImplNull_InitBackends(ImGuiApp* app)
135136
#ifdef IMGUI_HAS_VIEWPORT
136137
ImGuiIO& io = ImGui::GetIO();
137138
if (app->MockViewports && (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable))
138-
ImGuiApp_InstalMockViewportsBackend(app);
139+
ImGuiApp_InstallMockViewportsBackend(app);
139140
#else
140141
IM_UNUSED(app);
141142
#endif
@@ -348,7 +349,7 @@ static void ImGuiApp_ImplWin32DX11_InitBackends(ImGuiApp* app_opaque)
348349
#ifdef IMGUI_HAS_VIEWPORT
349350
ImGuiIO& io = ImGui::GetIO();
350351
if (app->MockViewports && (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable))
351-
ImGuiApp_InstalMockViewportsBackend(app);
352+
ImGuiApp_InstallMockViewportsBackend(app);
352353
#endif
353354
}
354355

@@ -714,7 +715,7 @@ static void ImGuiApp_ImplSdlGL2_InitBackends(ImGuiApp* app_opaque)
714715
#ifdef IMGUI_HAS_VIEWPORT
715716
ImGuiIO& io = ImGui::GetIO();
716717
if (app->MockViewports && (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable))
717-
ImGuiApp_InstalMockViewportsBackend(app);
718+
ImGuiApp_InstallMockViewportsBackend(app);
718719
#endif
719720
}
720721

@@ -860,7 +861,7 @@ static void ImGuiApp_ImplSdlGL3_InitBackends(ImGuiApp* app_opaque)
860861
#ifdef IMGUI_HAS_VIEWPORT
861862
ImGuiIO& io = ImGui::GetIO();
862863
if (app->MockViewports && (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable))
863-
ImGuiApp_InstalMockViewportsBackend(app);
864+
ImGuiApp_InstallMockViewportsBackend(app);
864865
#endif
865866
}
866867

@@ -1068,7 +1069,7 @@ static void ImGuiApp_ImplGlfw_InitBackends(ImGuiApp* app_opaque)
10681069
#ifdef IMGUI_HAS_VIEWPORT
10691070
ImGuiIO& io = ImGui::GetIO();
10701071
if (app->MockViewports && (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable))
1071-
ImGuiApp_InstalMockViewportsBackend(app);
1072+
ImGuiApp_InstallMockViewportsBackend(app);
10721073
#endif
10731074
}
10741075

@@ -1200,13 +1201,11 @@ static bool ImGuiApp_ImplGL_CaptureFramebuffer(ImGuiApp* app, ImGuiViewport* vie
12001201
#endif
12011202

12021203
//-----------------------------------------------------------------------------
1203-
// [SECTION] Mock backend for multi-viewports (Shared)
1204-
// The viewports are not visible
1204+
// [SECTION] Mock backend for multi-viewports (Shared): The viewports are not visible
12051205
//-----------------------------------------------------------------------------
12061206

12071207
#ifdef IMGUI_HAS_VIEWPORT
12081208

1209-
12101209
// A virtual window
12111210
struct ImGui_ImplMockViewport_ViewportData
12121211
{
@@ -1239,7 +1238,7 @@ static ImGui_ImplMockViewport_ViewportData* ImGui_ImplNullViewport_FindViewportD
12391238
}
12401239

12411240
// Mock backend (viewports not visible)
1242-
static void ImGuiApp_InstalMockViewportsBackend(ImGuiApp*)
1241+
static void ImGuiApp_InstallMockViewportsBackend(ImGuiApp*)
12431242
{
12441243
ImGuiIO& io = ImGui::GetIO();
12451244

0 commit comments

Comments
 (0)