[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar... |
Date: |
Thu, 03 Apr 2008 05:47:05 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 08/04/03 05:47:05
Modified files:
testsuite/misc-ming.all:
DefineEditTextVariableNameTest-Runner.cpp
DefineEditTextVariableNameTest.c
Log message:
test deletion of textField instance variables, got new xchecks.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest-Runner.cpp?cvsroot=gnash&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest.c?cvsroot=gnash&r1=1.22&r2=1.23
Patches:
Index: DefineEditTextVariableNameTest-Runner.cpp
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest-Runner.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- DefineEditTextVariableNameTest-Runner.cpp 2 Apr 2008 10:57:52 -0000
1.16
+++ DefineEditTextVariableNameTest-Runner.cpp 3 Apr 2008 05:47:05 -0000
1.17
@@ -42,7 +42,7 @@
sprite_instance* root = tester.getRootMovie();
assert(root);
- check_equals(root->get_frame_count(), 11);
+ check_equals(root->get_frame_count(), 13);
check_equals(root->get_play_state(), sprite_instance::PLAY);
check_equals(root->get_current_frame(), 0);
Index: DefineEditTextVariableNameTest.c
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/DefineEditTextVariableNameTest.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- DefineEditTextVariableNameTest.c 2 Apr 2008 09:00:16 -0000 1.22
+++ DefineEditTextVariableNameTest.c 3 Apr 2008 05:47:05 -0000 1.23
@@ -210,7 +210,7 @@
main(int argc, char** argv)
{
SWFMovie mo;
- SWFMovieClip mc1, mc2, mc3, mc4;
+ SWFMovieClip mc1, mc2, mc3, mc4, mc5, mc6;
SWFDisplayItem it;
const char *srcdir=".";
/* The variable name for textfield */
@@ -339,6 +339,45 @@
check_equals(mo, "mc4.uninitalized_text_var", "100");
SWFMovie_nextFrame(mo);
+ //
+ // (1) test deletion of text variable
+ //
+ mc5 = newSWFMovieClip();
+ add_text_field(mc5, (SWFBlock)bfont, "text_var5", NULL);
+ it = SWFMovie_add(mo, (SWFBlock)mc5);
+ SWFDisplayItem_setName(it, "mc5");
+ SWFDisplayItem_moveTo(it, 400, 300);
+ check_equals(mo, "typeof(mc5.textfield)", "'object'");
+ check_equals(mo, "typeof(mc5.text_var5)", "'undefined'");
+ add_actions(mo,
+ "mc5.text_var5 = 'intial_text';"
+ "delete mc5.text_var5;");
+ xcheck_equals(mo, "typeof(mc5.text_var5)", "'undefined'");
+ add_actions(mo,
+ "mc5.textfield.text = 'new_text';"
+ "mc5.textfield._width = 60;");
+ check_equals(mo, "mc5.text_var5", "'new_text'");
+ SWFMovie_nextFrame(mo);
+
+ //
+ // test deletion of text variable(another one).
+ //
+ mc6 = newSWFMovieClip();
+ add_text_field(mc6, (SWFBlock)bfont, "text_var6", "initial_text");
+ it = SWFMovie_add(mo, (SWFBlock)mc6);
+ SWFDisplayItem_setName(it, "mc6");
+ SWFDisplayItem_moveTo(it, 500, 300);
+ check_equals(mo, "typeof(mc6.textfield)", "'object'");
+ check_equals(mo, "typeof(mc6.text_var6)", "'string'");
+ add_actions(mo,
+ "delete mc6.text_var6;");
+ xcheck_equals(mo, "typeof(mc6.text_var6)", "'undefined'");
+ check_equals(mo, "mc6.textfield.text", "'initial_text'");
+ add_actions(mo,
+ "mc6.textfield.text = 'new_text';"
+ "mc6.textfield._width = 60;");
+ check_equals(mo, "mc6.text_var6", "'new_text'");
+ SWFMovie_nextFrame(mo);
/*********************************************
*
* Print test results
- [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., Zou Lunkai, 2008/04/02
- [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., Zou Lunkai, 2008/04/02
- [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar...,
Zou Lunkai <=
- Re: [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., strk, 2008/04/03
- Re: [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., zou lunkai, 2008/04/03
- Re: [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., zou lunkai, 2008/04/03
- Re: [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., Sandro Santilli, 2008/04/03
- Re: [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., zou lunkai, 2008/04/03
- Re: [Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., Sandro Santilli, 2008/04/03
[Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., Zou Lunkai, 2008/04/03
[Gnash-commit] gnash/testsuite/misc-ming.all DefineEditTextVar..., Zou Lunkai, 2008/04/08