[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/arra...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/arra... |
Date: |
Thu, 07 Feb 2008 09:46:36 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/02/07 09:46:36
Modified files:
. : ChangeLog
testsuite/actionscript.all: array.as
Log message:
make the test nicer with differnent sort() implementation (ie: don't
change
number of run tests based on number of calls to the custom comparator
function)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5582&r2=1.5583
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/array.as?cvsroot=gnash&r1=1.39&r2=1.40
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5582
retrieving revision 1.5583
diff -u -b -r1.5582 -r1.5583
--- ChangeLog 7 Feb 2008 08:15:06 -0000 1.5582
+++ ChangeLog 7 Feb 2008 09:46:35 -0000 1.5583
@@ -1,5 +1,9 @@
2008-02-07 Sandro Santilli <address@hidden>
+ * testsuite/actionscript.all/array.as: make the test nicer with
+ differnent sort() implementation (ie: don't change number of
+ run tests based on number of calls to the custom comparator
+ function)
* testsuite/actionscript.all/String.as: fix a bogus test line,
xcheck->check now succeeding tests, add the rcsid string.
Index: testsuite/actionscript.all/array.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/array.as,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- testsuite/actionscript.all/array.as 6 Feb 2008 17:00:00 -0000 1.39
+++ testsuite/actionscript.all/array.as 7 Feb 2008 09:46:36 -0000 1.40
@@ -18,7 +18,7 @@
// Initial test written by Mike Carlson
-rcsid="$Id: array.as,v 1.39 2008/02/06 17:00:00 strk Exp $";
+rcsid="$Id: array.as,v 1.40 2008/02/07 09:46:36 strk Exp $";
#include "check.as"
@@ -200,10 +200,14 @@
// Test sorting using a custom comparison function
//-----------------------------------------------------
+testCmpCalls=0;
+testCmpThis="not set";
function testCmp (x,y)
{
// Gnash fails here by *requiring* a not-null 'this_ptr' in fn_call
- xcheck_equals(typeof(this), 'undefined');
+ // NOTE: we can't rely on the number of calls to this function,
+ // which is implementation-defined
+ if ( testCmpCalls++ ) testCmpThis=this;
if (x.length < y.length) { return -1; }
if (x.length > y.length) { return 1; }
@@ -213,6 +217,8 @@
check_equals ( trysortarray.toString() ,
"But,Different,alphabet,capitalization" );
trysortarray.sort( testCmp );
check_equals ( trysortarray.toString() ,
"But,alphabet,Different,capitalization" );
+check_equals(typeof(testCmpThis), 'undefined');
+check_equals(testCmpCalls, 7); // I don't think this matters much..
function testCmpBogus1 (x,y) { return -1; }
trysortarray.sort( testCmpBogus1 );
@@ -1017,11 +1023,11 @@
#if OUTPUT_VERSION < 6
- check_totals(370);
+ check_totals(365);
#else
# if OUTPUT_VERSION < 7
- check_totals(398);
+ check_totals(393);
# else
- check_totals(405);
+ check_totals(400);
# endif
#endif