CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai <zoulunkai> 07/08/28 09:38:02
Modified files: . : ChangeLog server : swf_function.h testsuite/actionscript.all: case.as Log message: * testsuite/actionscript.all/case.as: more tests. * server/swf_function.h: set function args to lower case when needed. fix bug #20833. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4131&r2=1.4132 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf_function.h?cvsroot=gnash&r1=1.16&r2=1.17 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/case.as?cvsroot=gnash&r1=1.9&r2=1.10 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4131 retrieving revision 1.4132 diff -u -b -r1.4131 -r1.4132 --- ChangeLog 28 Aug 2007 08:45:10 -0000 1.4131 +++ ChangeLog 28 Aug 2007 09:38:01 -0000 1.4132 @@ -1,3 +1,9 @@ +2007-08-28 Zou Lunkai <[EMAIL PROTECTED]> + + * testsuite/actionscript.all/case.as: more tests. + * server/swf_function.h: set function args to lower case when needed. + fix bug #20833. + 2007-08-28 Sandro Santilli <[EMAIL PROTECTED]> * server/: Makefile.am, BitsReader.{cpp,h}: new memory bits reader. Index: server/swf_function.h =================================================================== RCS file: /sources/gnash/gnash/server/swf_function.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- server/swf_function.h 1 Jul 2007 10:54:25 -0000 1.16 +++ server/swf_function.h 28 Aug 2007 09:38:02 -0000 1.17 @@ -25,8 +25,10 @@ #include "impl.h" #include "as_function.h" // for inheritance #include "as_object.h" // for composition (vector element) +#include "VM.h" //fow SWF version //#include "with_stack_entry.h" // for composition (vector element) +#include <boost/algorithm/string/case_conv.hpp> #include <cassert> #include <string> @@ -218,7 +220,7 @@ assert(arg_register == 0 || m_is_function2 == true); m_args.resize(m_args.size() + 1); m_args.back().m_register = arg_register; - m_args.back().m_name = name; + m_args.back().m_name = PROPNAME(name); } void set_length(int len); Index: testsuite/actionscript.all/case.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/case.as,v retrieving revision 1.9 retrieving revision 1.10 diff -u -b -r1.9 -r1.10 --- testsuite/actionscript.all/case.as 24 Aug 2007 16:07:27 -0000 1.9 +++ testsuite/actionscript.all/case.as 28 Aug 2007 09:38:02 -0000 1.10 @@ -22,7 +22,7 @@ * Test case sensitivity */ -rcsid="$Id: case.as,v 1.9 2007/08/24 16:07:27 strk Exp $"; +rcsid="$Id: case.as,v 1.10 2007/08/28 09:38:02 zoulunkai Exp $"; #include "check.as" @@ -171,3 +171,30 @@ #endif #endif // OUTPUT_VERSION >= 6 } + +// +// Test function args +// +func = function (xYz) +{ + check_equals(xYz, 100); +#if OUTPUT_VERSION < 7 + check_equals(xyz, 100); +#endif + this.testVar = xYz; + check_equals(this.testVar, 100); +#if OUTPUT_VERSION < 7 + check_equals(this.testvar, 100); +#endif +}; +// call the function above, +// trigger tests in it. +func(100); + +#if OUTPUT_VERSION > 5 + mcRef = _root.createEmptyMovieClip("mc_XYZ", 3); + check_equals(typeof(_root['mc_XYZ']), 'movieclip'); + check_equals(typeof(_root['mcRef']), 'movieclip'); + check_equals(typeof(mcRef['gotoAndStop']), 'function'); +#endif + _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit