1// SoundLoaderContext_as.hx:  ActionScript 3 "SoundLoaderContext" 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// NOTE: works for flash v.9 and greater only!
27
28#if flash9
29import flash.media.SoundLoaderContext;
30import flash.display.MovieClip;
31#end
32import flash.Lib;
33import Type;
34import Std;
35
36import DejaGnu;
37
38// Class must be named with the PP prefix, as that's the name the
39// file passed to haxe will have after the preprocessing step
40class SoundLoaderContext_as {
41    static function main() {
42#if flash9
43        var x1:SoundLoaderContext = new SoundLoaderContext();
44
45        // Make sure we actually get a valid class
46        if (Std.is(x1, SoundLoaderContext)) {
47            DejaGnu.pass("SoundLoaderContext class exists");
48        } else {
49            DejaGnu.fail("SoundLoaderContext lass doesn't exist");
50        }
51// Tests to see if all the properties exist. All these do is test for
52// existance of a property, and don't test the functionality at all. This
53// is primarily useful only to test completeness of the API implementation.
54	if (Std.is(x1.bufferTime, Float)) {
55	    DejaGnu.pass("SoundLoaderContext::bufferTime property exists");
56	} else {
57	    DejaGnu.fail("SoundLoaderContext::bufferTime property doesn't exist");
58	}
59	if (Std.is(x1.checkPolicyFile, Bool)) {
60	    DejaGnu.pass("SoundLoaderContext::checkPolicyFile property exists");
61	} else {
62	    DejaGnu.fail("SoundLoaderContext::checkPolicyFile property doesn't exist");
63	}
64
65// Call this after finishing all tests. It prints out the totals.
66	DejaGnu.done();
67#else
68	DejaGnu.note("This class (SoundLoaderContext) is only available in flash9");
69#end
70    }
71}
72