Fix tests
This commit is contained in:
2024-10-17 10:21:19 +02:00
parent f64df41df8
commit 399390d737
10 changed files with 28 additions and 38 deletions
+3 -4
View File
@@ -2,10 +2,9 @@
TEST(UI_dial, to_from_json)
{
UI_dial dial("slider_id", "slider_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
json j = dial.to_json();
UI_dial dial("slider_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
json j = dial.to_json(0);
UI_dial dial2(j);
EXPECT_EQ(dial.id(), dial2.id());
EXPECT_EQ(dial.text(), dial2.text());
EXPECT_EQ(dial.fg_color(), dial2.fg_color());
EXPECT_EQ(dial.bg_color(), dial2.bg_color());
@@ -14,7 +13,7 @@ TEST(UI_dial, to_from_json)
TEST(UI_dial, set_value)
{
UI_dial dial("slider_id", "slider_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
UI_dial dial("slider_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
dial.set_value(75);
EXPECT_EQ(dial.value(), 75);
}