~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to testsuite/misc-haxe.all/classes.all/desktop/ClipboardFormats_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
// ClipboardFormats_as.hx:  ActionScript 3 "ClipboardFormats" 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
 
 
27
// NOTE: this only works with flash v.9 and above
 
28
 
 
29
#if flash9 || !flash
 
30
import flash.desktop.ClipboardFormats;
 
31
import flash.display.MovieClip;
 
32
#end
 
33
import flash.Lib;
 
34
import Type;
 
35
 
 
36
// import our testing API
 
37
import DejaGnu;
 
38
 
 
39
// Class must be named with the _as suffix, as that's the same name as the file.
 
40
class ClipboardFormats_as {
 
41
    static function main() {
 
42
        #if !flash9
 
43
                DejaGnu.note("This does not apply to lower than flash v9");
 
44
                #end
 
45
                
 
46
                var x1:ClipboardFormats = new ClipboardFormats();
 
47
 
 
48
        // Make sure we actually get a valid class        
 
49
        if (x1 != null) {
 
50
            DejaGnu.pass("ClipboardFormats class exists");
 
51
        } else {
 
52
            DejaGnu.fail("ClipboardFormats lass doesn't exist");
 
53
        }
 
54
 
 
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 flash9
 
59
                if (ClipboardFormats.HTML_FORMAT == "air:html") {
 
60
                        DejaGnu.pass("ClipboardFormats::HTML_FORMAT properly exists");
 
61
                } else {
 
62
                        DejaGnu.fail("ClipboardFormats::HTML_FORMAT string is not right");
 
63
                }
 
64
                
 
65
                if (ClipboardFormats.RICH_TEXT_FORMAT == "air:rtf") {
 
66
                        DejaGnu.pass("ClipboardFormats::RICH_TEXT_FORMAT properly exists");
 
67
                } else {
 
68
                        DejaGnu.fail("ClipboardFormats::RICH_TEXT_FORMAT string is not right");
 
69
                }
 
70
                
 
71
                if (ClipboardFormats.TEXT_FORMAT == "air:text") {
 
72
                        DejaGnu.pass("ClipboardFormats::TEXT_FORMAT properly exists");
 
73
                } else {
 
74
                        DejaGnu.fail("ClipboardFormats::TEXT_FORMAT string is not right");
 
75
                }
 
76
                #end
 
77
                #if !flash
 
78
                if (ClipboardFormats.BITMAP_FORMAT == "air:bitmap") {
 
79
                        DejaGnu.pass("ClipboardFormats::BITMAP_FORMAT properly exists");
 
80
                } else {
 
81
                        DejaGnu.fail("ClipboardFormats::BITMAP_FORMAT string is not right");
 
82
                }
 
83
                if (ClipboardFormats.FILE_LIST_FORMAT == "air:file list") {
 
84
                        DejaGnu.pass("ClipboardFormats::FILE_LIST_FORMAT properly exists");
 
85
                } else {
 
86
                        DejaGnu.fail("ClipboardFormats::FILE_LIST_FORMAT string is not right");
 
87
                }
 
88
                if (ClipboardFormats.URL_FORMAT == "air:url") {
 
89
                        DejaGnu.pass("ClipboardFormats::URL_FORMAT properly exists");
 
90
                } else {
 
91
                        DejaGnu.fail("ClipboardFormats::URL_FORMAT string is not right");
 
92
                }
 
93
                #end
 
94
        // Call this after finishing all tests. It prints out the totals.
 
95
        DejaGnu.done();
 
96
    }
 
97
}
 
98
 
 
99
// local Variables:
 
100
// mode: C++
 
101
// indent-tabs-mode: t
 
102
// End:
 
103