Dylan Smith : d3dx9/tests: Fix comparison that expects NAN, since NAN != NAN.

Alexandre Julliard julliard at winehq.org
Mon Jun 27 17:41:21 CDT 2011


Module: wine
Branch: master
Commit: 3d7af6a334eadc6f207e97e5eb0a4a65eb67a603
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3d7af6a334eadc6f207e97e5eb0a4a65eb67a603

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Sat Jun 25 14:32:16 2011 -0400

d3dx9/tests: Fix comparison that expects NAN, since NAN != NAN.

---

 dlls/d3dx9_36/tests/mesh.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index c96b94e..98d77d9 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -4809,7 +4809,7 @@ static void test_create_skin_info(void)
             exp_vertices[0] = 0;
             exp_vertices[1] = 0x87654321;
             exp_weights[0] = 0.5;
-            exp_weights[1] = 0.0f / 0.0f;
+            exp_weights[1] = 0.0f / 0.0f; /* NAN */
             num_influences = 2;
 
             hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 1, num_influences, vertices, weights);
@@ -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],
                    "influence[%d]: expected weights %g, got %g\n", i, exp_weights[i], weights[i]);
             }
 




More information about the wine-cvs mailing list