2 // Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #if MING_VERSION_CODE
>= 00040003
24 # define MING_SUPPORTS_ASM
25 # if MING_VERSION_CODE
>= 00040004
26 # define MING_SUPPORTS_ASM_EXTENDS
27 # define MING_SUPPORTS_ASM_GETPROPERTY
28 # define MING_SUPPORTS_ASM_SETPROPERTY
29 # define MING_SUPPORTS_ASM_TONUMBER
30 # define MING_SUPPORTS_ASM_TOSTRING
31 # if MING_VERSION_CODE
>= 00040005
32 # define MING_SUPPORTS_ASM_TARGETPATH
33 # if MING_VERSION_CODE
< 00040006
34 # define MING_LOGICAL_ANDOR_BROKEN
36 # if MING_VERSION_CODE
>= 00040006
37 # define MING_SUPPORTS_ASM_IMPLEMENTS
44 // ONLINE mode uses DEJAGNU module
46 # define USE_DEJAGNU_MODULE
49 // Use facilities provided by dejagnu shared library module
51 // NOTE: if you define USE_DEJAGNU_MODULE you
52 // will also need put dejagnu_so_init.as in first frame
53 // and put dejagnu_so_fini.as in last frame.
54 #ifdef USE_DEJAGNU_MODULE
58 #else // ndef USE_DEJAGNU_MODULE
60 #define pass_check
(text
) trace
("PASSED: "+text
)
61 #define xpass_check
(text
) trace
("XPASSED: "+text
)
62 #define fail_check
(text
) trace
("FAILED: "+text
)
63 #define xfail_check
(text
) trace
("XFAILED: "+text
)
64 #define info
(x
) trace
(x
)
70 // Use to get stuff in the testsuite/media.
73 // getUrl( MEDIA(green.swf) );
75 #define MEDIA
(x
) MEDIADIR
+ "/" + #x
77 #define INFO
" [" + __FILE__
+ ":" + __LINE__
+ "]"
79 #define check_totals
(x
) totals
(x
, INFO
)
80 #define xcheck_totals
(x
) xtotals
(x
, INFO
)
83 // Use check(<expression>)
86 if ( expr
) pass_check
(#expr
+ \
87 " [" + __FILE__
+ ":" + __LINE__
+ "]" ); \
88 else fail_check
(#expr
+ \
89 " [" + __FILE__
+ ":" + __LINE__
+ "]" ); \
91 #define xcheck
(expr
) \
92 if ( expr
) xpass_check
(#expr
+ \
93 " [" + __FILE__
+ ":" + __LINE__
+ "]" ); \
94 else xfail_check
(#expr
+ \
95 " [" + __FILE__
+ ":" + __LINE__
+ "]" ); \
98 // Use check_equals(<obtained>, <expected>)
100 #define check_equals
(obt
, exp
) \
101 if ( obt
== exp
) pass_check
( \
102 #obt
+ " == " + #exp
+ \
103 " [" + __FILE__
+ ":" + __LINE__
+ "]" ); \
104 else fail_check
("expected: " + #exp
+ \
105 " obtained: " + obt
+ \
106 " [" + __FILE__
+ ":" + __LINE__
+ "]" ); \
108 #define xcheck_equals
(obt
, exp
) \
109 if ( obt
== exp
) xpass_check
( \
110 #obt
+ " == " + #exp
+ \
111 " [" + __FILE__
+ ":" + __LINE__
+ "]" ); \
112 else xfail_check
("expected: " + #exp
+ \
113 " obtained: " + obt
+ \
114 " [" + __FILE__
+ ":" + __LINE__
+ "]" ); \
116 #ifndef SUPPRESS_RCSID_DUMP
120 // If using the DEJAGNU_MODULE this info will be printed
121 // by code in dejagnu_so_init.as
122 #ifndef USE_DEJAGNU_MODULE
123 info
("SWF" + OUTPUT_VERSION
+ " - " + System.capabilities
.version
+ "\n");