From 9370aabc30ac2498b499eac4c26d3580f5ecddfa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 11 Nov 2011 20:04:25 +0000 Subject: Make scale point test tolerate different results orders. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3610 a436a847-0d15-0410-975c-d299462d15a1 --- test/lilv_test.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'test/lilv_test.c') 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); -- cgit v1.2.1