summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-12 17:17:03 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-11-14 15:31:52 -0500
commit330d1cd22be4460a0091ec576646ff6f3742c910 (patch)
treed6d6dba54bf47a9f3dd55983af05d93be1f62141
parentf69d742e14830e3e6141bdbcf2ef17080f7ad2ff (diff)
downloadpango-330d1cd22be4460a0091ec576646ff6f3742c910.tar.gz
testrandom: Don't assert too much
-rw-r--r--tests/testrandom.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/testrandom.c b/tests/testrandom.c
index 3f6e4ce0..3b9b543d 100644
--- a/tests/testrandom.c
+++ b/tests/testrandom.c
@@ -131,16 +131,20 @@ test_wrap_char (gconstpointer data)
g_qsort_with_data (sizes, G_N_ELEMENTS (sizes), sizeof (Size), compare_size, NULL);
- g_assert_cmpint (sizes[0].width, >=, min.width);
- g_assert_cmpint (sizes[0].height, <=, min.height);
+ if (sizes[0].set_width >= min.width)
+ {
+ g_assert_cmpint (sizes[0].width, >=, min.width);
+ g_assert_cmpint (sizes[0].height, <=, min.height);
+ }
for (i = 1; i < G_N_ELEMENTS (sizes); i++)
{
+ if (sizes[i].set_width < min.width)
+ continue;
+
g_assert_cmpint (sizes[i-1].set_width, <=, sizes[i].set_width);
g_assert_cmpint (sizes[i-1].width, <=, sizes[i].width);
g_assert_cmpint (sizes[i-1].height, >=, sizes[i].height);
- if (sizes[i-1].width == sizes[i].width)
- g_assert_cmpint (sizes[i-1].height, ==, sizes[i].height);
}
if (sizes[i-1].set_width >= max.width)