Update with current status
[gnash.git] / testsuite / misc-haxe.all / classes.all / printing / PrintJobOrientation_as.hx
blob1cd7b7467ab34a7a2b182d284a563de05ab0d7ee
1 // PrintJobOrientation_as.hx: ActionScript 3 "PrintJobOrientation" 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.
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.
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
23 // This test case must be processed by CPP before compiling to include the
24 // DejaGnu.hx header file for the testing framework support.
26 #if flash9
27 import flash.printing.PrintJobOrientation;
28 import flash.display.MovieClip;
29 #else
30 //import flash.PrintJobOrientation;
31 //import flash.MovieClip;
32 #end
33 import flash.Lib;
34 import Type;
35 import Std;
37 // import our testing API
38 import DejaGnu;
40 // Class must be named with the _as suffix, as that's the same name as the file.
41 class PrintJobOrientation_as {
42 static function main() {
44 #if !flash9
45 DejaGnu.note("PrintJobOrientation does not exist in versions prior to flash9");
46 #else
48 // Make sure we actually get a valid class
49 if (PrintJobOrientation != null) {
50 DejaGnu.pass("PrintJobOrientation class exists");
51 } else {
52 DejaGnu.fail("PrintJobOrientation class doesn't exist");
55 // Tests to see if all the methods exist. All these do is test for
56 // existance of a method, and don't test the functionality at all. This
57 // is primarily useful only to test completeness of the API implementation.
58 if (Std.is(PrintJobOrientation.LANDSCAPE, String) && Std.string(PrintJobOrientation.LANDSCAPE)=="landscape" ) {
59 DejaGnu.pass("PrintJobOrientation::LANDSCAPE constant exists");
60 } else {
61 DejaGnu.fail("PrintJobOrientation::LANDSCAPE constant does not exist");
64 if (Std.is(PrintJobOrientation.PORTRAIT, String) && Std.string(PrintJobOrientation.PORTRAIT)=="portrait" ) {
65 DejaGnu.pass("PrintJobOrientation::LANDSCAPE constant exists");
66 } else {
67 DejaGnu.fail("PrintJobOrientation::LANDSCAPE constant does not exist");
70 #end
71 // Call this after finishing all tests. It prints out the totals.
72 DejaGnu.done();
76 // local Variables:
77 // mode: C++
78 // indent-tabs-mode: t
79 // End: