Skip to content

Commit 8412ecb

Browse files
committed
TestSuite: amend "table_synced_1" to test side by side synched instances.
ocornut/imgui#7933
1 parent ab6de4d commit 8412ecb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

imgui_test_suite/imgui_tests_tables.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,7 @@ void RegisterTests_Table(ImGuiTestEngine* e)
14971497
};
14981498

14991499
// ## Test rendering two tables with same ID (multi-instance, synced tables) (#5557)
1500+
// ## Test resizing with different X position. (#7933)
15001501
t = IM_REGISTER_TEST(e, "table", "table_synced_1");
15011502
struct MultiInstancesVars { bool MultiWindow = false, SideBySide = false, DifferSizes = false, Retest = false; int ClickCounters[3] = {}; };
15021503
t->SetVarsDataType<MultiInstancesVars>();
@@ -1575,7 +1576,7 @@ void RegisterTests_Table(ImGuiTestEngine* e)
15751576
// Columns preserve proportions across instances.
15761577
float table_width = table->WorkRect.GetWidth();
15771578
for (int c = 0; c < col_count; c++)
1578-
IM_CHECK(first_instance_width / column_widths[c] == table_width / table->Columns[c].WidthGiven);
1579+
IM_CHECK_EQ(first_instance_width / column_widths[c], table_width / table->Columns[c].WidthGiven);
15791580
}
15801581
}
15811582

@@ -1603,9 +1604,11 @@ void RegisterTests_Table(ImGuiTestEngine* e)
16031604
continue; // Not applicable.
16041605

16051606
#if !IMGUI_BROKEN_TESTS
1606-
// FIXME-TABLE: Column resize happens within first table instance, but depends on table->WorkRect of resized instance, which isn't available. See TableGetMaxColumnWidth().
1607+
#if IMGUI_VERSION_NUM < 19105
16071608
if (vars.MultiWindow && vars.SideBySide)
16081609
continue;
1610+
#endif
1611+
// FIXME-TABLE: Column resize for multiple instances is not perfect. (e.g. #7933)
16091612
if (vars.DifferSizes)
16101613
continue;
16111614
#endif

0 commit comments

Comments
 (0)