Re: d3dx9/tests: Fix comparison that expects NAN, since NAN != NAN.
Dylan Smith <dylan.ah.smith(a)gmail.com> writes:
@@ -4834,7 +4834,7 @@ static void test_create_skin_info(void) for (i = 0; i < num_influences; i++) { ok(exp_vertices[i] == vertices[i], "influence[%d]: expected vertex %u, got %u\n", i, exp_vertices[i], vertices[i]); - ok(exp_weights[i] == weights[i], + ok((isnan(exp_weights[i]) && isnan(weights[i])) || exp_weights[i] == weights[i],
I put this in for now to fix the tests, but isnan() isn't really portable, we should try to find a better way. -- Alexandre Julliard julliard(a)winehq.org
On Tuesday 28 June 2011 00:40:09 Alexandre Julliard wrote:
Dylan Smith <dylan.ah.smith(a)gmail.com> writes:
@@ -4834,7 +4834,7 @@ static void test_create_skin_info(void) for (i = 0; i < num_influences; i++) { ok(exp_vertices[i] == vertices[i], "influence[%d]: expected vertex %u, got %u\n", i, exp_vertices[i], vertices[i]); - ok(exp_weights[i] == weights[i], + ok((isnan(exp_weights[i]) && isnan(weights[i])) || exp_weights[i] == weights[i],
I put this in for now to fix the tests, but isnan() isn't really portable, we should try to find a better way.
You can replace isnan(x) with (x != x), but isnan is specified by the ISO C99 standard, so it should be portable.
On 06/28/2011 10:59 AM, Tijl Coosemans wrote:
On Tuesday 28 June 2011 00:40:09 Alexandre Julliard wrote:
Dylan Smith<dylan.ah.smith(a)gmail.com> writes:
@@ -4834,7 +4834,7 @@ static void test_create_skin_info(void) for (i = 0; i< num_influences; i++) { ok(exp_vertices[i] == vertices[i], "influence[%d]: expected vertex %u, got %u\n", i, exp_vertices[i], vertices[i]); - ok(exp_weights[i] == weights[i], + ok((isnan(exp_weights[i])&& isnan(weights[i])) || exp_weights[i] == weights[i], I put this in for now to fix the tests, but isnan() isn't really portable, we should try to find a better way. You can replace isnan(x) with (x != x), but isnan is specified by the ISO C99 standard, so it should be portable. "Wine adheres to standard C89/C90. Code should be written so that it works with as many compilers as possible, so you should avoid compiler-specific constructs, C99 and C++. " from http://wiki.winehq.org/SubmittingPatches.
participants (3)
-
Alexandre Julliard -
GOUJON Alexandre -
Tijl Coosemans