[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9542: Array fixes and negative matr
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9542: Array fixes and negative matrix scale tests |
Date: |
Mon, 28 Jul 2008 17:56:28 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9542
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Mon 2008-07-28 17:56:28 +0200
message:
Array fixes and negative matrix scale tests
modified:
libcore/array.cpp
testsuite/actionscript.all/MovieClip.as
testsuite/actionscript.all/array.as
------------------------------------------------------------
revno: 9541.1.1
committer: Sandro Santilli <address@hidden>
branch nick: mybranch
timestamp: Mon 2008-07-28 17:18:52 +0200
message:
Simple tests for Array.shift
modified:
testsuite/actionscript.all/array.as
------------------------------------------------------------
revno: 9541.1.2
committer: Sandro Santilli <address@hidden>
branch nick: mybranch
timestamp: Mon 2008-07-28 17:26:17 +0200
message:
Fix Array.shift(). See bug #23946
boost::numeric::ublas::mapped_vector<>::clear() doesn't resize the vector.
modified:
libcore/array.cpp
------------------------------------------------------------
revno: 9541.1.3
committer: Sandro Santilli <address@hidden>
branch nick: mybranch
timestamp: Mon 2008-07-28 17:53:43 +0200
message:
Add test for setting _xscale and _yscale to negative values.
modified:
testsuite/actionscript.all/MovieClip.as
=== modified file 'libcore/array.cpp'
--- a/libcore/array.cpp 2008-07-21 15:54:10 +0000
+++ b/libcore/array.cpp 2008-07-28 15:26:17 +0000
@@ -1584,7 +1584,8 @@
if ( count >= v.size() )
{
- v.clear();
+ // NOTE: v.clear() would NOT set size to 0 !!
+ v.resize(0);
return;
}
=== modified file 'testsuite/actionscript.all/MovieClip.as'
--- a/testsuite/actionscript.all/MovieClip.as 2008-07-19 07:20:09 +0000
+++ b/testsuite/actionscript.all/MovieClip.as 2008-07-28 15:53:43 +0000
@@ -27,19 +27,19 @@
endOfTest = function()
{
#if OUTPUT_VERSION <= 5
- check_totals(231); // SWF5
+ check_totals(235); // SWF5
#endif
#if OUTPUT_VERSION == 6
- check_totals(655); // SWF6
+ check_totals(659); // SWF6
#endif
#if OUTPUT_VERSION == 7
- check_totals(672); // SWF7
+ check_totals(676); // SWF7
#endif
#if OUTPUT_VERSION >= 8
- check_totals(673); // SWF8+
+ check_totals(677); // SWF8+
#endif
play();
@@ -1087,6 +1087,14 @@
check_equals(b.yMin, 5);
check_equals(b.yMax, 15);
+draw._yscale = -50;
+check_equals(draw._yscale, -50);
+check_equals(draw._height, 10);
+
+draw._xscale = -50;
+check_equals(draw._xscale, -50);
+check_equals(draw._width, 5);
+
container._xscale = 100;
container._yscale = 100;
draw._yscale = 100;
=== modified file 'testsuite/actionscript.all/array.as'
--- a/testsuite/actionscript.all/array.as 2008-07-24 21:04:17 +0000
+++ b/testsuite/actionscript.all/array.as 2008-07-28 15:18:52 +0000
@@ -440,6 +440,25 @@
b.pop();
check_equals ( b.toString() , "" );
+//-----------------------------------------------------
+// Test Array.shift()
+//-----------------------------------------------------
+
+a = new Array(1);
+check_equals(a.length, 1);
+ret = a.shift();
+check_equals(typeof(ret), 'undefined');
+check_equals(a.length, 0);
+a[1] = 'a';
+check_equals(a.length, 2);
+ret = a.shift();
+check_equals(typeof(ret), 'undefined');
+check_equals(a.length, 1);
+ret = a.shift();
+check_equals(typeof(ret), 'string');
+check_equals(ret, 'a');
+check_equals(a.length, 0);
+
//------------------------------------------------------
// Test Array.reverse
//------------------------------------------------------
@@ -1440,11 +1459,11 @@
#if OUTPUT_VERSION < 6
- check_totals(484);
+ check_totals(493);
#else
# if OUTPUT_VERSION < 7
- check_totals(545);
+ check_totals(554);
# else
- check_totals(555);
+ check_totals(564);
# endif
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9542: Array fixes and negative matrix scale tests,
Sandro Santilli <=