summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-11 20:04:25 +0000
committerDavid Robillard <d@drobilla.net>2011-11-11 20:04:25 +0000
commit9370aabc30ac2498b499eac4c26d3580f5ecddfa (patch)
tree36efa34e5c09387e2be63e164765bb28146d1ef7 /test
parentd2388d3aad0f7cc591be1df5a31877cf23bdaf15 (diff)
downloadlilv-9370aabc30ac2498b499eac4c26d3580f5ecddfa.tar.gz
lilv-9370aabc30ac2498b499eac4c26d3580f5ecddfa.tar.bz2
lilv-9370aabc30ac2498b499eac4c26d3580f5ecddfa.zip
Make scale point test tolerate different results orders.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3610 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'test')
-rw-r--r--test/lilv_test.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/lilv_test.c b/test/lilv_test.c
index b5746c8..85f91da 100644
--- a/test/lilv_test.c
+++ b/test/lilv_test.c
@@ -756,10 +756,18 @@ test_port(void)
const LilvScalePoint* sp1 = lilv_scale_points_get(points, sp_iter);
TEST_ASSERT(sp1);
- TEST_ASSERT(!strcmp(lilv_node_as_string(lilv_scale_point_get_label(sp0)), "Sin"));
- TEST_ASSERT(lilv_node_as_float(lilv_scale_point_get_value(sp0)) == 3);
- TEST_ASSERT(!strcmp(lilv_node_as_string(lilv_scale_point_get_label(sp1)), "Cos"));
- TEST_ASSERT(lilv_node_as_float(lilv_scale_point_get_value(sp1)) == 4);
+ TEST_ASSERT(
+ ((!strcmp(lilv_node_as_string(lilv_scale_point_get_label(sp0)), "Sin")
+ && lilv_node_as_float(lilv_scale_point_get_value(sp0)) == 3)
+ &&
+ (!strcmp(lilv_node_as_string(lilv_scale_point_get_label(sp1)), "Cos")
+ && lilv_node_as_float(lilv_scale_point_get_value(sp1)) == 4))
+ ||
+ ((!strcmp(lilv_node_as_string(lilv_scale_point_get_label(sp0)), "Cos")
+ && lilv_node_as_float(lilv_scale_point_get_value(sp0)) == 4)
+ &&
+ (!strcmp(lilv_node_as_string(lilv_scale_point_get_label(sp1)), "Sin")
+ && lilv_node_as_float(lilv_scale_point_get_value(sp1)) == 3)));
LilvNode* homepage_p = lilv_new_uri(world, "http://usefulinc.com/ns/doap#homepage");
LilvNodes* homepages = lilv_plugin_get_value(plug, homepage_p);