mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
UI tests
Fix tests
This commit is contained in:
+3
-4
@@ -2,10 +2,9 @@
|
||||
|
||||
TEST(UI_thermo, to_from_json)
|
||||
{
|
||||
UI_thermo thermo("thermo_id", "thermo_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
|
||||
json j = thermo.to_json();
|
||||
UI_thermo thermo("thermo_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
|
||||
json j = thermo.to_json(0);
|
||||
UI_thermo thermo2(j);
|
||||
EXPECT_EQ(thermo.id(), thermo2.id());
|
||||
EXPECT_EQ(thermo.text(), thermo2.text());
|
||||
EXPECT_EQ(thermo.fg_color(), thermo2.fg_color());
|
||||
EXPECT_EQ(thermo.bg_color(), thermo2.bg_color());
|
||||
@@ -14,7 +13,7 @@ TEST(UI_thermo, to_from_json)
|
||||
|
||||
TEST(UI_thermo, set_value)
|
||||
{
|
||||
UI_thermo thermo("thermo_id", "thermo_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
|
||||
UI_thermo thermo("thermo_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
|
||||
thermo.set_value(75);
|
||||
EXPECT_EQ(thermo.value(), 75);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user