summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-06-02 16:21:05 +0200
committerDave Davenport <qball@gmpclient.org>2017-06-02 16:21:05 +0200
commit7352f1c2bacb1da3dc603f88da54176ddc5f9107 (patch)
tree91f8de3a1afb876ad9758ba9eeb07258d4bd6739 /test
parent48bf1709b6bcc316ad8019afc11d2cf8452817a0 (diff)
Change PixelWidth to RofiPixelUnit.
Diffstat (limited to 'test')
-rw-r--r--test/theme-parser-test.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/test/theme-parser-test.c b/test/theme-parser-test.c
index e2fd9083..7d6f67a7 100644
--- a/test/theme-parser-test.c
+++ b/test/theme-parser-test.c
@@ -222,12 +222,12 @@ START_TEST ( test_properties_distance_em)
wid.state = NULL;
rofi_theme_parse_string ( "* { test: 10em;}");
ck_assert_ptr_nonnull ( rofi_theme );
- Distance d = (Distance){ 1, PW_PX, SOLID};
+ Distance d = (Distance){ 1, ROFI_PU_PX, ROFI_HL_SOLID};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "test", pi);
ck_assert_int_eq ( p.left.distance , 10 );
- ck_assert_int_eq( p.left.type , PW_EM );
- ck_assert_int_eq( p.left.style, SOLID);
+ ck_assert_int_eq( p.left.type , ROFI_PU_EM );
+ ck_assert_int_eq( p.left.style, ROFI_HL_SOLID);
}
END_TEST
@@ -238,17 +238,17 @@ START_TEST ( test_properties_distance_em_linestyle)
wid.state = NULL;
rofi_theme_parse_string ( "* { sol: 1.3em solid; dash: 1.5em dash;}");
ck_assert_ptr_nonnull ( rofi_theme );
- Distance d = (Distance){ 1, PW_PX, SOLID};
+ Distance d = (Distance){ 1, ROFI_PU_PX, ROFI_HL_SOLID};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "sol", pi);
ck_assert_double_eq ( p.left.distance , 1.3 );
- ck_assert_int_eq( p.left.type , PW_EM );
- ck_assert_int_eq( p.left.style, SOLID);
+ ck_assert_int_eq( p.left.type , ROFI_PU_EM );
+ ck_assert_int_eq( p.left.style, ROFI_HL_SOLID);
p = rofi_theme_get_padding ( &wid, "dash", pi);
ck_assert_double_eq ( p.left.distance , 1.5 );
- ck_assert_int_eq( p.left.type , PW_EM );
- ck_assert_int_eq( p.left.style, DASH);
+ ck_assert_int_eq( p.left.type , ROFI_PU_EM );
+ ck_assert_int_eq( p.left.style, ROFI_HL_DASH);
}
END_TEST
START_TEST ( test_properties_distance_px)
@@ -258,12 +258,12 @@ START_TEST ( test_properties_distance_px)
wid.state = NULL;
rofi_theme_parse_string ( "* { test: 10px;}");
ck_assert_ptr_nonnull ( rofi_theme );
- Distance d = (Distance){ 1, PW_EM, DASH};
+ Distance d = (Distance){ 1, ROFI_PU_EM, ROFI_HL_DASH};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "test", pi);
ck_assert_double_eq ( p.left.distance , 10.0 );
- ck_assert_int_eq( p.left.type , PW_PX );
- ck_assert_int_eq( p.left.style, SOLID);
+ ck_assert_int_eq( p.left.type , ROFI_PU_PX );
+ ck_assert_int_eq( p.left.style, ROFI_HL_SOLID);
}
END_TEST
START_TEST ( test_properties_distance_px_linestyle)
@@ -273,16 +273,16 @@ START_TEST ( test_properties_distance_px_linestyle)
wid.state = NULL;
rofi_theme_parse_string ( "* { sol: 10px solid; dash: 14px dash;}");
ck_assert_ptr_nonnull ( rofi_theme );
- Distance d = (Distance){ 1, PW_EM, DASH};
+ Distance d = (Distance){ 1, ROFI_PU_EM, ROFI_HL_DASH};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "sol", pi);
ck_assert_double_eq ( p.left.distance , 10.0 );
- ck_assert_int_eq( p.left.type , PW_PX );
- ck_assert_int_eq( p.left.style, SOLID);
+ ck_assert_int_eq( p.left.type , ROFI_PU_PX );
+ ck_assert_int_eq( p.left.style, ROFI_HL_SOLID);
p = rofi_theme_get_padding ( &wid, "dash", pi);
ck_assert_double_eq ( p.left.distance , 14.0 );
- ck_assert_int_eq( p.left.type , PW_PX );
- ck_assert_int_eq( p.left.style, DASH);
+ ck_assert_int_eq( p.left.type , ROFI_PU_PX );
+ ck_assert_int_eq( p.left.style, ROFI_HL_DASH);
}
END_TEST
START_TEST ( test_properties_distance_percent)
@@ -292,12 +292,12 @@ START_TEST ( test_properties_distance_percent)
wid.state = NULL;
rofi_theme_parse_string ( "* { test: 10%;}");
ck_assert_ptr_nonnull ( rofi_theme );
- Distance d = (Distance){ 1, PW_EM, DASH};
+ Distance d = (Distance){ 1, ROFI_PU_EM, ROFI_HL_DASH};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "test", pi);
ck_assert_double_eq ( p.left.distance , 10.0 );
- ck_assert_int_eq( p.left.type , PW_PERCENT);
- ck_assert_int_eq( p.left.style, SOLID);
+ ck_assert_int_eq( p.left.type , ROFI_PU_PERCENT);
+ ck_assert_int_eq( p.left.style, ROFI_HL_SOLID);
}
END_TEST
START_TEST ( test_properties_distance_percent_linestyle)
@@ -307,16 +307,16 @@ START_TEST ( test_properties_distance_percent_linestyle)
wid.state = NULL;
rofi_theme_parse_string ( "* { sol: 10% solid; dash: 10% dash;}");
ck_assert_ptr_nonnull ( rofi_theme );
- Distance d = (Distance){ 1, PW_EM, DASH};
+ Distance d = (Distance){ 1, ROFI_PU_EM, ROFI_HL_DASH};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "sol", pi);
ck_assert_double_eq ( p.left.distance , 10.0 );
- ck_assert_int_eq( p.left.type , PW_PERCENT);
- ck_assert_int_eq( p.left.style, SOLID);
+ ck_assert_int_eq( p.left.type , ROFI_PU_PERCENT);
+ ck_assert_int_eq( p.left.style, ROFI_HL_SOLID);
p = rofi_theme_get_padding ( &wid, "dash", pi);
ck_assert_double_eq ( p.left.distance , 10 );
- ck_assert_int_eq( p.left.type , PW_PERCENT);
- ck_assert_int_eq( p.left.style, DASH);
+ ck_assert_int_eq( p.left.type , ROFI_PU_PERCENT);
+ ck_assert_int_eq( p.left.style, ROFI_HL_DASH);
}
END_TEST
START_TEST ( test_properties_position)
@@ -961,17 +961,17 @@ START_TEST ( test_properties_padding_2 )
wid.name = "blaat";
wid.state = NULL;
rofi_theme_parse_string ( "* { test: 10px 20px;}");
- Distance d = (Distance){ 1, PW_PX, SOLID};
+ Distance d = (Distance){ 1, ROFI_PU_PX, ROFI_HL_SOLID};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "test", pi);
ck_assert_double_eq ( p.left.distance , 20 );
- ck_assert_int_eq ( p.left.type , PW_PX );
+ ck_assert_int_eq ( p.left.type , ROFI_PU_PX );
ck_assert_double_eq ( p.right.distance , 20 );
- ck_assert_int_eq ( p.right.type , PW_PX );
+ ck_assert_int_eq ( p.right.type , ROFI_PU_PX );
ck_assert_double_eq ( p.top.distance , 10 );
- ck_assert_int_eq ( p.top.type , PW_PX );
+ ck_assert_int_eq ( p.top.type , ROFI_PU_PX );
ck_assert_double_eq ( p.bottom.distance , 10 );
- ck_assert_int_eq ( p.bottom.type , PW_PX );
+ ck_assert_int_eq ( p.bottom.type , ROFI_PU_PX );
}
END_TEST
@@ -981,17 +981,17 @@ START_TEST ( test_properties_padding_3 )
wid.name = "blaat";
wid.state = NULL;
rofi_theme_parse_string ( "* { test: 10px 30px 20px;}");
- Distance d = (Distance){ 1, PW_PX, SOLID};
+ Distance d = (Distance){ 1, ROFI_PU_PX, ROFI_HL_SOLID};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "test", pi);
ck_assert_double_eq ( p.left.distance , 30 );
- ck_assert_int_eq ( p.left.type , PW_PX );
+ ck_assert_int_eq ( p.left.type , ROFI_PU_PX );
ck_assert_double_eq ( p.right.distance , 30 );
- ck_assert_int_eq ( p.right.type , PW_PX );
+ ck_assert_int_eq ( p.right.type , ROFI_PU_PX );
ck_assert_double_eq ( p.top.distance , 10 );
- ck_assert_int_eq ( p.top.type , PW_PX );
+ ck_assert_int_eq ( p.top.type , ROFI_PU_PX );
ck_assert_double_eq ( p.bottom.distance , 20 );
- ck_assert_int_eq ( p.bottom.type , PW_PX );
+ ck_assert_int_eq ( p.bottom.type , ROFI_PU_PX );
}
END_TEST
@@ -1001,17 +1001,17 @@ START_TEST ( test_properties_padding_4 )
wid.name = "blaat";
wid.state = NULL;
rofi_theme_parse_string ( "* { test: 10px 30px 20px 40px;}");
- Distance d = (Distance){ 1, PW_PX, SOLID};
+ Distance d = (Distance){ 1, ROFI_PU_PX, ROFI_HL_SOLID};
Padding pi = (Padding){d,d,d,d};
Padding p = rofi_theme_get_padding ( &wid, "test", pi);
ck_assert_double_eq ( p.left.distance , 40 );
- ck_assert_int_eq ( p.left.type , PW_PX );
+ ck_assert_int_eq ( p.left.type , ROFI_PU_PX );
ck_assert_double_eq ( p.right.distance , 30 );
- ck_assert_int_eq ( p.right.type , PW_PX );
+ ck_assert_int_eq ( p.right.type , ROFI_PU_PX );
ck_assert_double_eq ( p.top.distance , 10 );
- ck_assert_int_eq ( p.top.type , PW_PX );
+ ck_assert_int_eq ( p.top.type , ROFI_PU_PX );
ck_assert_double_eq ( p.bottom.distance , 20 );
- ck_assert_int_eq ( p.bottom.type , PW_PX );
+ ck_assert_int_eq ( p.bottom.type , ROFI_PU_PX );
}
END_TEST