Add extra test for angle unit.

This commit is contained in:
Dave Davenport 2017-05-18 08:14:41 +02:00
parent 72afc7b039
commit fa125cb456
1 changed files with 7 additions and 1 deletions

View File

@ -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 )