[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/DefineE... |
Date: |
Mon, 27 Aug 2007 09:56:01 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/08/27 09:56:01
Modified files:
. : ChangeLog
testsuite/misc-ming.all: DefineEditTextVariableNameTest2.c
Makefile.am
Log message:
* testsuite/misc-ming.all/DefineEditTextVariableNameTest2.c,
testsuite/misc-ming.all/Makefile.am: more tests, finished
deduction, testcase now enabled.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4112&r2=1.4113
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest2.c?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.148&r2=1.149
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4112
retrieving revision 1.4113
diff -u -b -r1.4112 -r1.4113
--- ChangeLog 27 Aug 2007 08:11:42 -0000 1.4112
+++ ChangeLog 27 Aug 2007 09:56:00 -0000 1.4113
@@ -1,3 +1,9 @@
+2007-08-27 Zou Lunkai <address@hidden>
+
+ * testsuite/misc-ming.all/DefineEditTextVariableNameTest2.c,
+ testsuite/misc-ming.all/Makefile.am: more tests, finished
+ deduction, testcase now enabled.
+
2007-08-27 Sandro Santilli <address@hidden>
* testsuite/server/: Makefile.am, StreamTest.cpp:
Index: testsuite/misc-ming.all/DefineEditTextVariableNameTest2.c
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest2.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-ming.all/DefineEditTextVariableNameTest2.c 24 Aug 2007
07:36:25 -0000 1.1
+++ testsuite/misc-ming.all/DefineEditTextVariableNameTest2.c 27 Aug 2007
09:56:01 -0000 1.2
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2007 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,7 +22,20 @@
*
* Test DefineEditText tag with VariableName
*
- * TODO: review this testcase later.
+ * Description:
+ * Frame2: add dtext1, associate it with a variable 'edit_text_var'
+ * Frame3: add dtext2, associate it with a variable 'edit_text_var' again
+ * Frame4: add dtext2, associate it with a variable 'edit_text_var' again
+ * Frame5: set edit_text_var to 'Hahaha'
+ * Frame6: remove dtext1
+ * Frame7: remove dtext2
+ * Frame8: remove dtext3
+ * Frame 9: add dtext4, associate it with a variable 'edit_text_var' again
+ * Frame 10: set edit_text_var to a new Object
+ * Frame 11: provide a user defined toString for edit_text_var
+ * Frame 12: some checks
+ * Frame 13: set edit_text_var to a new Object again
+ * Frame 14: end
*
* run as ./DefineEditTextVariableNameTest2
*/
@@ -141,24 +154,28 @@
SWFMovie_nextFrame(mo);
// Frame6: remove dtext1
+
SWFDisplayItem_remove(it1);
check_equals(mo, "typeof(edit_text_var)", "'string'" );
check_equals(mo, "edit_text_var", "'Hahaha'");
SWFMovie_nextFrame(mo);
// Frame7: remove dtext2
+
SWFDisplayItem_remove(it2);
check_equals(mo, "typeof(edit_text_var)", "'string'" );
check_equals(mo, "edit_text_var", "'Hahaha'");
SWFMovie_nextFrame(mo);
// Frame8: remove dtext3
+
SWFDisplayItem_remove(it3);
check_equals(mo, "typeof(edit_text_var)", "'string'" );
check_equals(mo, "edit_text_var", "'Hahaha'");
SWFMovie_nextFrame(mo);
// Frame 9: add dtext4, associate it with a variable 'edit_text_var' again.
+
it4 = add_text_field(mo, (SWFBlock)bfont, "edit_text_var", "Hello");
SWFDisplayItem_setName(it4, "dtext4");
SWFDisplayItem_moveTo(it4, 0, 400);
@@ -167,35 +184,41 @@
SWFMovie_nextFrame(mo);
// Frame10: set edit_text_var to a new Object
+
add_actions(mo, "edit_text_var = new Object();");
check_equals(mo, "typeof(edit_text_var)", "'object'");
check_equals(mo, "typeof(dtext4.text)", "'string'");
- // dtext4.text == Object.toString()
xcheck_equals(mo, "dtext4.text", "'[object Object]'");
SWFMovie_nextFrame(mo);
// Frame 11: provide a user defined toString for edit_text_var
- //
- add_actions(mo, "Object.prototype.toString = function() {return 'Hello
world';}; ");
+
+ add_actions(mo, "Object.prototype.toString = function() {return
'TO_STRING';}; ");
check_equals(mo, "typeof(dtext4.text)", "'string'");
- // Object.prototype.toString not invoked here!
- // Strange!!!
+ // Object.prototype.toString not invoked for dtext4.text!
xcheck_equals(mo, "dtext4.text", "'[object Object]'");
check_equals(mo, "typeof(dtext4.text.toString)", "'function'");
xcheck_equals(mo, "dtext4.text.toString()", "'[object Object]'");
xcheck_equals(mo, "dtext4.text.valueOf()", "'[object Object]'");
SWFMovie_nextFrame(mo);
- // Frame 13: prints 'Hello world', but the text in dtext4 is '[object
Object]'
- // Strange!!!
- add_actions(mo, "_root.note(edit_text_var);");
+ // Frame 12: dtext4.text still not updated
+ // Deduction: dtext4.text won't update if edit_text_var is untouched.
+ check_equals(mo, "edit_text_var.toString()", "'TO_STRING'");
+ xcheck_equals(mo, "dtext4.text", "'[object Object]'");
+ SWFMovie_nextFrame(mo);
+
+ // Frame 13: dtext4.text updated.
+ // Deduction: setting edit_text_var triggered updating dtext4.text.
+ add_actions(mo, "edit_text_var = new Object();");
+ check_equals(mo, "edit_text_var.toString()", "'TO_STRING'");
+ xcheck_equals(mo, "dtext4.text", "'TO_STRING'");
SWFMovie_nextFrame(mo);
// Frame 14: end
add_actions(mo, "totals(); stop();");
SWFMovie_nextFrame(mo);
-
// Output movie
puts("Saving " OUTPUT_FILENAME );
SWFMovie_save(mo, OUTPUT_FILENAME);
Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -b -r1.148 -r1.149
--- testsuite/misc-ming.all/Makefile.am 22 Aug 2007 05:55:09 -0000 1.148
+++ testsuite/misc-ming.all/Makefile.am 27 Aug 2007 09:56:01 -0000 1.149
@@ -61,6 +61,8 @@
DefineEditTextTest-Runner \
DefineEditTextVariableNameTest \
DefineEditTextVariableNameTest-Runner \
+ DefineEditTextVariableNameTest2 \
+ DefineEditTextVariableNameTest2-Runner \
Dejagnu \
Dejagnu.swf \
PlaceObject2Test \
@@ -236,6 +238,7 @@
loop_test8runner \
shape_testrunner \
registerClassTest2runner \
+ DefineEditTextVariableNameTest-Runner \
$(NULL)
if MAKESWF_SUPPORTS_PREBUILT_CLIPS
@@ -271,6 +274,8 @@
definebitsjpeg2_SOURCES = definebitsjpeg2.c
definebitsjpeg2_LDADD = $(MING_LIBS)
+definebitsjpeg2.swf: definebitsjpeg2
+ ./definebitsjpeg2 $(srcdir)/../media/lynch.jpg
moviecliploader_test_SOURCES = moviecliploader_test.c
moviecliploader_test_LDADD = $(MING_LIBS)
@@ -307,11 +312,6 @@
DefineEditTextTest.swf \
$(NULL)
-DefineEditTextVariableNameTest_SOURCES = \
- DefineEditTextVariableNameTest.c \
- $(NULL)
-DefineEditTextVariableNameTest_LDADD = libgnashmingutils.la
-
spritehier_SOURCES = spritehier.c
spritehier_LDADD = $(MING_LIBS)
@@ -343,8 +343,10 @@
eventSoundTest1.swf \
$(NULL)
-definebitsjpeg2.swf: definebitsjpeg2
- ./definebitsjpeg2 $(srcdir)/../media/lynch.jpg
+DefineEditTextVariableNameTest_SOURCES = \
+ DefineEditTextVariableNameTest.c \
+ $(NULL)
+DefineEditTextVariableNameTest_LDADD = libgnashmingutils.la
DefineEditTextVariableNameTest.swf: DefineEditTextVariableNameTest
./DefineEditTextVariableNameTest $(top_srcdir)/testsuite/media
@@ -360,6 +362,19 @@
DefineEditTextVariableNameTest.swf \
$(NULL)
+
+DefineEditTextVariableNameTest2_SOURCES = \
+ DefineEditTextVariableNameTest2.c \
+ $(NULL)
+DefineEditTextVariableNameTest2_LDADD = libgnashmingutils.la
+
+DefineEditTextVariableNameTest2.swf: DefineEditTextVariableNameTest2
+ ./DefineEditTextVariableNameTest2 $(top_srcdir)/testsuite/media
+
+DefineEditTextVariableNameTest2-Runner: $(srcdir)/../generic-testrunner.sh
DefineEditTextVariableNameTest2.swf
+ sh $< $(top_builddir) DefineEditTextVariableNameTest2.swf > $@
+ chmod 755 $@
+
timeline_var_test_SOURCES = \
timeline_var_test.c \
$(NULL)
@@ -1617,6 +1632,7 @@
TEST_DRIVERS = ../simple.exp
TEST_CASES = \
DefineEditTextVariableNameTest-Runner \
+ DefineEditTextVariableNameTest2-Runner \
DefineEditTextTest-Runner \
RollOverOutTest-Runner \
ButtonEventsTest-Runner \