summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-05-18 08:14:41 +0200
committerDave Davenport <qball@gmpclient.org>2017-05-18 08:14:41 +0200
commitfa125cb45601bd8fbee817215cee32dc63479c27 (patch)
treea46d070eceba0c9bc24dcf1c282f3c44a4ef73a0
parent72afc7b0399834bc2b6c3a45f761b548f47b3cab (diff)
Add extra test for angle unit.
-rw-r--r--test/theme-parser-test.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/theme-parser-test.c b/test/theme-parser-test.c
index 2166758b..713f8726 100644
--- a/test/theme-parser-test.c
+++ b/test/theme-parser-test.c
@@ -777,7 +777,7 @@ START_TEST ( test_properties_color_hwb_ws )
widget wid;
wid.name = "blaat";
wid.state = NULL;
- rofi_theme_parse_string ( "* { test1: hwb(190 deg 65 %0%); test2: hwb(295 grad 31% 29%);testa: hwb(0.736 turn 31% 29% / 40%); }");
+ rofi_theme_parse_string ( "* { test1: hwb(190 deg 65 %0%); test2: hwb(295 grad 31% 29%);testa: hwb(0.736 turn 31% 29% / 40%); rada: hwb(0.2 rad 30% 30%/40%); }");
ThemeWidget *twid = rofi_theme_find_widget ( wid.name, wid.state, FALSE );
Property *p = rofi_theme_find_property ( twid, P_COLOR, "test2", FALSE );
@@ -798,6 +798,12 @@ START_TEST ( test_properties_color_hwb_ws )
ck_assert_double_eq_tol ( p->value.color.red , 0x7a/255.0 , 0.004);
ck_assert_double_eq_tol ( p->value.color.green , 0x4f/255.0, 0.004 );
ck_assert_double_eq_tol ( p->value.color.blue , 0xb5/255.0 , 0.004);
+ p = rofi_theme_find_property ( twid, P_COLOR, "rada", FALSE );
+ ck_assert_ptr_nonnull ( p );
+ ck_assert_double_eq ( p->value.color.alpha , 0.4 );
+ ck_assert_double_eq_tol ( p->value.color.red , 0.7 , 0.004);
+ ck_assert_double_eq_tol ( p->value.color.green , 0.376, 0.004 );
+ ck_assert_double_eq_tol ( p->value.color.blue , 0.3 , 0.004);
}
END_TEST
START_TEST ( test_properties_color_cmyk )