"Fossies" - the Fresh Open Source Software Archive 
Member "gnash-0.8.10/testsuite/misc-haxe.all/classes.all/events/ActivityEvent_as.hx" (19 Jan 2012, 3185 Bytes) of package /linux/www/old/gnash-0.8.10.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) haXe source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 // ActivityEvent_as.hx: ActionScript 3 "ActivityEvent" class, for Gnash.
2 //
3 // Generated by gen-as3.sh on: 20090515 by "rob". Remove this
4 // after any hand editing loosing changes.
5 //
6 // Copyright (C) 2009, 2010 Free Software Foundation, Inc.
7 //
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 3 of the License, or
11 // (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 //
22
23 // This test case must be processed by CPP before compiling to include the
24 // DejaGnu.hx header file for the testing framework support.
25
26 #if flash9
27 import flash.events.ActivityEvent;
28 import flash.display.MovieClip;
29 #end
30 import flash.Lib;
31 import Type;
32 import Std;
33
34 // import our testing API
35 import DejaGnu;
36
37 // Class must be named with the _as suffix, as that's the same name as the file.
38 class ActivityEvent_as {
39 static function main() {
40 #if !flash9
41 DejaGnu.note("This class did not exist prior to as3");
42 #end
43 #if flash9
44 var x1:ActivityEvent = new ActivityEvent("Test Event");
45
46 // Make sure we actually get a valid class
47 if (x1 != null) {
48 DejaGnu.pass("ActivityEvent class exists");
49 } else {
50 DejaGnu.fail("ActivityEvent class doesn't exist");
51 }
52 // Tests to see if all the properties exist. All these do is test for
53 // existance of a property, and don't test the functionality at all. This
54 // is primarily useful only to test completeness of the API implementation.
55 if (Std.is(x1.activating, Bool)) {
56 DejaGnu.pass("ActivityEvent.activating property exists");
57 } else {
58 DejaGnu.fail("ActivityEvent.activating property doesn't exist");
59 }
60
61 // Tests to see if all the methods exist. All these do is test for
62 // existance of a method, and don't test the functionality at all. This
63 // is primarily useful only to test completeness of the API implementation.
64 if (Type.typeof(x1.clone) == ValueType.TFunction) {
65 DejaGnu.pass("ActivityEvent::clone() method exists");
66 } else {
67 DejaGnu.fail("ActivityEvent::clone() method doesn't exist");
68 }
69 if (Type.typeof(x1.toString) == ValueType.TFunction) {
70 DejaGnu.pass("ActivityEvent::toString() method exists");
71 } else {
72 DejaGnu.fail("ActivityEvent::toString() method doesn't exist");
73 }
74 // if (Std.string(x1.ACTIVITY) == "activity") {
75 // DejaGnu.pass("ActivityEvent::ACTIVITY() method exists");
76 // } else {
77 // DejaGnu.fail("ActivityEvent::ACTIVITY() method doesn't exist");
78 // }
79 #end
80 // Call this after finishing all tests. It prints out the totals.
81 DejaGnu.done();
82 }
83 }
84
85 // local Variables:
86 // mode: C++
87 // indent-tabs-mode: t
88 // End:
89