gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/testsuite/actionscript.all MovieClip.as


From: Zou Lunkai
Subject: [Gnash-commit] gnash/testsuite/actionscript.all MovieClip.as
Date: Tue, 25 Dec 2007 06:12:54 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/12/25 06:12:54

Modified files:
        testsuite/actionscript.all: MovieClip.as 

Log message:
        fix unsafe float number comparison, those checks failed here.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/MovieClip.as?cvsroot=gnash&r1=1.106&r2=1.107

Patches:
Index: MovieClip.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/MovieClip.as,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- MovieClip.as        29 Nov 2007 13:03:29 -0000      1.106
+++ MovieClip.as        25 Dec 2007 06:12:54 -0000      1.107
@@ -20,7 +20,7 @@
 // compile this test case with Ming makeswf, and then
 // execute it like this gnash -1 -r 0 -v out.swf
 
-rcsid="$Id: MovieClip.as,v 1.106 2007/11/29 13:03:29 strk Exp $";
+rcsid="$Id: MovieClip.as,v 1.107 2007/12/25 06:12:54 zoulunkai Exp $";
 
 #include "check.as"
 
@@ -1132,15 +1132,24 @@
 check_equals(typeof(container), 'movieclip');
 check_equals(typeof(container_ref.getBounds), 'function');
 b = container.getBounds(); 
-check_equals(b.xMin, 6710886.35);
-check_equals(b.xMax, 6710886.35);
-check_equals(b.yMin, 6710886.35);
-check_equals(b.yMax, 6710886.35);
+// check_equals(b.xMin, 6710886.35);
+// check_equals(b.xMax, 6710886.35);
+// check_equals(b.yMin, 6710886.35);
+// check_equals(b.yMax, 6710886.35);
+check(b.xMin - 6710886.35 < 0.0001);
+check(b.xMax - 6710886.35 < 0.0001);
+check(b.yMin - 6710886.35 < 0.0001);
+check(b.yMax - 6710886.35 < 0.0001);
+
 b = container_ref.getBounds(); 
-check_equals(b.xMin, 6710886.35);
-check_equals(b.xMax, 6710886.35);
-check_equals(b.yMin, 6710886.35);
-check_equals(b.yMax, 6710886.35);
+// check_equals(b.xMin, 6710886.35);
+// check_equals(b.xMax, 6710886.35);
+// check_equals(b.yMin, 6710886.35);
+// check_equals(b.yMax, 6710886.35);
+check(b.xMin - 6710886.35 < 0.0001);
+check(b.xMax - 6710886.35 < 0.0001);
+check(b.yMin - 6710886.35 < 0.0001);
+check(b.yMax - 6710886.35 < 0.0001);
 
 #endif // OUTPUT_VERSION >= 6
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]