~ubuntu-branches/ubuntu/maverick/gnash/maverick

« back to all changes in this revision

Viewing changes to testsuite/misc-haxe.all/classes.all/display/GradientType_as.hx

  • Committer: Bazaar Package Importer
  • Author(s): Sindhudweep Narayan Sarkar
  • Date: 2009-10-07 00:06:10 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20091007000610-mj9rwqe774gizn1j
Tags: 0.8.6-0ubuntu1
new upstream release 0.8.6 (LP: #435897)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// GradientType_as.hx:  ActionScript 3 "GradientType" class, for Gnash.
 
2
//
 
3
// Generated by gen-as3.sh on: 20090514 by "rob". Remove this
 
4
// after any hand editing loosing changes.
 
5
//
 
6
//   Copyright (C) 2009 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.display.GradientType;
 
28
import flash.display.MovieClip;
 
29
#else
 
30
//import flash.GradientType;
 
31
//import flash.MovieClip;
 
32
#end
 
33
import flash.Lib;
 
34
import Type;
 
35
import Std;
 
36
 
 
37
// import our testing API
 
38
import DejaGnu;
 
39
 
 
40
// Class must be named with the _as suffix, as that's the same name as the file.
 
41
class GradientType_as {
 
42
    static function main() {
 
43
 
 
44
#if !flash9
 
45
                DejaGnu.note("GradientType does not exist in versions prior to flash9");
 
46
 
 
47
#else           
 
48
                
 
49
                //DejaGnu.note("out1: " + Type.getClassFields(GradientType));
 
50
        // Make sure we actually get a valid class        
 
51
        if ( Std.is(GradientType.LINEAR, String) && Std.string(GradientType.LINEAR)=="linear" ) {
 
52
            DejaGnu.pass("GradientType.LINEAR constant exists");
 
53
        } else {
 
54
            DejaGnu.fail("GradientType.LINEAR constant doesn't exist");
 
55
        }
 
56
 
 
57
        if (Std.is(GradientType.RADIAL, String) && Std.string(GradientType.RADIAL)=="radial") {
 
58
            DejaGnu.pass("GradientTypee.RADIAL constant exists");
 
59
        } else {
 
60
            DejaGnu.fail("GradientTypee.RADIAL constant doesn't exist");
 
61
        }
 
62
 
 
63
#end
 
64
 
 
65
// Tests to see if all the methods exist. All these do is test for
 
66
// existance of a method, and don't test the functionality at all. This
 
67
// is primarily useful only to test completeness of the API implementation.
 
68
 
 
69
        // Call this after finishing all tests. It prints out the totals.
 
70
        DejaGnu.done();
 
71
    }
 
72
}
 
73
 
 
74
// local Variables:
 
75
// mode: C++
 
76
// indent-tabs-mode: t
 
77
// End:
 
78