summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-08-26 10:31:34 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-08-26 10:40:26 +0200
commitc633a9d18495910ff9fc57b192779b486ec640b2 (patch)
treef4657cda85a6a7a38f1e0e19e5737db6255620fb /tests
parent18922d25f2c6ed37ecbf893e6062e87ebc3e66ff (diff)
downloadat-spi2-atk-c633a9d18495910ff9fc57b192779b486ec640b2.tar.gz
atk_test_value: Use exactly representable float values
Some archs might round them differently from xml and from C, leading to float comparison failure, e.g. on i386.
Diffstat (limited to 'tests')
-rw-r--r--tests/atk_test_value.c8
-rw-r--r--tests/data/test-value.xml2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/atk_test_value.c b/tests/atk_test_value.c
index 4638293..0911603 100644
--- a/tests/atk_test_value.c
+++ b/tests/atk_test_value.c
@@ -43,7 +43,7 @@ atk_test_value_get_minimum_value (gpointer fixture, gconstpointer user_data)
g_assert (child);
AtspiValue *obj = atspi_accessible_get_value_iface (child);
gdouble val = atspi_value_get_minimum_value (obj, NULL);
- g_assert_cmpfloat (val, ==, 1.1);
+ g_assert_cmpfloat (val, ==, 1.25);
}
static void
@@ -55,7 +55,7 @@ atk_test_value_get_current_value (gpointer fixture, gconstpointer user_data)
g_assert (child);
AtspiValue *obj = atspi_accessible_get_value_iface (child);
gdouble val = atspi_value_get_current_value (obj, NULL);
- g_assert_cmpfloat (val, ==, 2.1);
+ g_assert_cmpfloat (val, ==, 2.25);
}
static void
@@ -67,7 +67,7 @@ atk_test_value_get_maximum_value (gpointer fixture, gconstpointer user_data)
g_assert (child);
AtspiValue *obj = atspi_accessible_get_value_iface (child);
gdouble val = atspi_value_get_maximum_value (obj, NULL);
- g_assert_cmpfloat (val, ==, 3.1);
+ g_assert_cmpfloat (val, ==, 3.25);
}
static void
@@ -92,7 +92,7 @@ atk_test_value_get_minimum_increment (gpointer fixture, gconstpointer user_data)
g_assert (child);
AtspiValue *obj = atspi_accessible_get_value_iface (child);
gdouble val = atspi_value_get_minimum_increment (obj, NULL);
- g_assert_cmpfloat (val, ==, 0.1);
+ g_assert_cmpfloat (val, ==, 0.25);
}
static void
diff --git a/tests/data/test-value.xml b/tests/data/test-value.xml
index 83172d5..1f5ae6c 100644
--- a/tests/data/test-value.xml
+++ b/tests/data/test-value.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<accessible description="Root of the accessible tree" name="root_object" role="accelerator label">
<accessible_value description="first child" name="obj0" role="alert">
- <value_node min="1.1" current="2.1" max="3.1" step="0.1"/>
+ <value_node min="1.25" current="2.25" max="3.25" step="0.25"/>
</accessible_value>
</accessible>