1// SoundTransform_as.hx:  ActionScript 3 "SoundTransform" class, for Gnash.
2//
3// Generated on: 20090603 by "bnaugle". 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
27//NOTE: this is a new class for as3 (flash9 and >)
28
29
30#if flash9
31import flash.media.SoundTransform;
32import flash.media.SoundChannel;
33import flash.display.MovieClip;
34#end
35import flash.Lib;
36import Type;
37
38import DejaGnu;
39
40// Class must be named with the PP prefix, as that's the name the
41// file passed to haxe will have after the preprocessing step
42class SoundTransform_as {
43    static function main() {
44#if flash9
45        var x1:SoundTransform = new SoundTransform();
46
47        // Make sure we actually get a valid class
48        if (Std.is(x1, SoundTransform)) {
49            DejaGnu.pass("SoundTransform class exists");
50        } else {
51            DejaGnu.fail("SoundTransform lass doesn't exist");
52        }
53// Tests to see if all the properties exist. All these do is test for
54// existance of a property, and don't test the functionality at all. This
55// is primarily useful only to test completeness of the API implementation.
56	if (Std.is(x1.leftToLeft, Float)) {
57	    DejaGnu.pass("SoundTransform::leftToLeft property exists");
58	} else {
59	    DejaGnu.fail("SoundTransform::leftToLeft property doesn't exist");
60	}
61	if (Std.is(x1.leftToRight, Float)) {
62	    DejaGnu.pass("SoundTransform::leftToRight property exists");
63	} else {
64	    DejaGnu.fail("SoundTransform::leftToRight property doesn't exist");
65	}
66	if (Std.is(x1.pan, Float)) {
67	    DejaGnu.pass("SoundTransform::pan property exists");
68	} else {
69	    DejaGnu.fail("SoundTransform::pan property doesn't exist");
70	}
71	if (Std.is(x1.rightToLeft, Float)) {
72	    DejaGnu.pass("SoundTransform::rightToLeft property exists");
73	} else {
74	    DejaGnu.fail("SoundTransform::rightToLeft property doesn't exist");
75	}
76	if (Std.is(x1.rightToRight, Float)) {
77	    DejaGnu.pass("SoundTransform::rightToRight property exists");
78	} else {
79	    DejaGnu.fail("SoundTransform::rightToRight property doesn't exist");
80	}
81	if (Std.is(x1.volume, Float)) {
82	    DejaGnu.pass("SoundTransform::volume property exists");
83	} else {
84	    DejaGnu.fail("SoundTransform::volume property doesn't exist");
85	}
86
87        // Call this after finishing all tests. It prints out the totals.
88        DejaGnu.done();
89#else
90	DejaGnu.note("This class (SoundTransform) is only available in flash9");
91#end
92    }
93}
94