diff --git a/tests/conform/test-clutter-units.c b/tests/conform/test-clutter-units.c index 105c454a9..d50a41689 100644 --- a/tests/conform/test-clutter-units.c +++ b/tests/conform/test-clutter-units.c @@ -61,10 +61,21 @@ test_units_string (TestConformSimpleFixture *fixture, ClutterUnits units; gchar *string; + g_assert (clutter_units_from_string (&units, "") == FALSE); + g_assert (clutter_units_from_string (&units, "10") == TRUE); g_assert (clutter_units_get_unit_type (&units) == CLUTTER_UNIT_PIXEL); g_assert_cmpfloat (clutter_units_get_unit_value (&units), ==, 10); + g_assert (clutter_units_from_string (&units, "10 px") == TRUE); + g_assert (clutter_units_get_unit_type (&units) == CLUTTER_UNIT_PIXEL); + + g_assert (clutter_units_from_string (&units, "10 mm") == TRUE); + g_assert (clutter_units_get_unit_type (&units) == CLUTTER_UNIT_MM); + + g_assert (clutter_units_from_string (&units, "10 cm") == TRUE); + g_assert (clutter_units_get_unit_type (&units) == CLUTTER_UNIT_CM); + g_assert (clutter_units_from_string (&units, "10 ") == TRUE); g_assert (clutter_units_get_unit_type (&units) == CLUTTER_UNIT_PIXEL); g_assert_cmpfloat (clutter_units_get_unit_value (&units), ==, 10);