[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: |
Wed, 06 Feb 2008 14:41:58 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/02/06 14:41:58
Modified files:
. : ChangeLog
testsuite/actionscript.all: array.as
Log message:
add a couple of additional tests for sorting an array using
a bogus custom function.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5573&r2=1.5574
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/array.as?cvsroot=gnash&r1=1.36&r2=1.37
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5573
retrieving revision 1.5574
diff -u -b -r1.5573 -r1.5574
--- ChangeLog 6 Feb 2008 13:51:07 -0000 1.5573
+++ ChangeLog 6 Feb 2008 14:41:57 -0000 1.5574
@@ -1,5 +1,7 @@
2008-02-06 Sandro Santilli <address@hidden>
+ * testsuite/actionscript.all/array.as: add a couple of additional
+ tests for sorting an array using a bogus custom function.
* gui/kde.cpp, gui/kdesup.h: disable no-op movie control menu items
(jump,step forward,back); add Refresh menu item.
* gui/sdl_agg_glue.cpp: fix compiler warnings
Index: testsuite/actionscript.all/array.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/array.as,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- testsuite/actionscript.all/array.as 3 Dec 2007 18:05:07 -0000 1.36
+++ testsuite/actionscript.all/array.as 6 Feb 2008 14:41:57 -0000 1.37
@@ -18,7 +18,7 @@
// Initial test written by Mike Carlson
-rcsid="$Id: array.as,v 1.36 2007/12/03 18:05:07 strk Exp $";
+rcsid="$Id: array.as,v 1.37 2008/02/06 14:41:57 strk Exp $";
#include "check.as"
@@ -196,7 +196,10 @@
check_equals ( trysortarray.toString() ,
"But,Different,alphabet,capitalization" );
// TODO - test sort(Array.RETURNINDEXEDARRAY)
+//-----------------------------------------------------
// Test sorting using a custom comparison function
+//-----------------------------------------------------
+
function testCmp (x,y)
{
// Gnash fails here by *requiring* a not-null 'this_ptr' in fn_call
@@ -211,6 +214,23 @@
trysortarray.sort( testCmp );
check_equals ( trysortarray.toString() ,
"But,alphabet,Different,capitalization" );
+function testCmpBogus1 (x,y) { return -1; }
+function testCmpBogus2 (x,y) { return 1; }
+function testCmpBogus3 (x,y) { return 0; }
+
+trysortarray.sort( testCmpBogus1 );
+check_equals ( trysortarray.toString() ,
"But,alphabet,Different,capitalization" );
+
+trysortarray.sort( testCmpBogus2 );
+xcheck_equals ( trysortarray.toString() ,
"alphabet,Different,capitalization,But" );
+
+trysortarray.sort( testCmpBogus3 );
+xcheck_equals ( trysortarray.toString() ,
"alphabet,Different,capitalization,But" );
+
+//-----------------------------------------------------
+// Test Array.pop()
+//-----------------------------------------------------
+
popped=b.pop();
check ( popped == 12 );
popped=b.pop();
@@ -983,11 +1003,11 @@
#if OUTPUT_VERSION < 6
- check_totals(363);
+ check_totals(366);
#else
# if OUTPUT_VERSION < 7
- check_totals(391);
+ check_totals(394);
# else
- check_totals(398);
+ check_totals(401);
# endif
#endif
- [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/arra...,
Sandro Santilli <=