Codebase list colord / d68cd11
tests: Don't use exact floating point comparisons. The tests asserting that cd_icc_get_version are exactly equal to 3.4 or 2.09 fail on (at least) i386, armel, and s390x because floating point is hateful. Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com> Christopher James Halse Rogers authored 3 years ago Richard Hughes committed 3 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
14931493 /* check profile properties */
14941494 g_assert_cmpint (cd_icc_get_size (icc), ==, 25244);
14951495 g_assert_cmpstr (cd_icc_get_checksum (icc), ==, "9ace8cce8baac8d492a93a2a232d7702");
1496 g_assert_cmpfloat (cd_icc_get_version (icc), ==, 3.4);
1496 g_assert_cmpfloat_with_epsilon (cd_icc_get_version (icc), 3.4, 0.01);
14971497 g_assert (g_str_has_suffix (cd_icc_get_filename (icc), "ibm-t61.icc"));
14981498 g_assert_cmpint (cd_icc_get_kind (icc), ==, CD_PROFILE_KIND_DISPLAY_DEVICE);
14991499 g_assert_cmpint (cd_icc_get_colorspace (icc), ==, CD_COLORSPACE_RGB);
17261726 g_object_unref (file);
17271727
17281728 /* verify changed values */
1729 g_assert_cmpfloat (cd_icc_get_version (icc), ==, 2.09);
1729 g_assert_cmpfloat_with_epsilon (cd_icc_get_version (icc), 2.09, 0.001);
17301730 g_assert_cmpint (cd_icc_get_kind (icc), ==, CD_PROFILE_KIND_OUTPUT_DEVICE);
17311731 g_assert_cmpint (cd_icc_get_colorspace (icc), ==, CD_COLORSPACE_XYZ);
17321732 g_assert_cmpstr (cd_icc_get_metadata_item (icc, "SelfTest"), ==, "true");