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

« back to all changes in this revision

Viewing changes to testsuite/misc-haxe.all/classes.all/data/SQLConnection_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
// SQLConnection_as.hx:  ActionScript 3 "SQLConnection" 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.data.SQLConnection;
 
28
import flash.display.MovieClip;
 
29
#else
 
30
import flash.SQLConnection;
 
31
import flash.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 SQLConnection_as {
 
41
    static function main() {
 
42
        var x1:SQLConnection = new SQLConnection();
 
43
 
 
44
        // Make sure we actually get a valid class        
 
45
        if (x1 != null) {
 
46
            DejaGnu.pass("SQLConnection class exists");
 
47
        } else {
 
48
            DejaGnu.fail("SQLConnection lass doesn't exist");
 
49
        }
 
50
// Tests to see if all the properties exist. All these do is test for
 
51
// existance of a property, and don't test the functionality at all. This
 
52
// is primarily useful only to test completeness of the API implementation.
 
53
        if (x1.autoCompact == false) {
 
54
            DejaGnu.pass("SQLConnection::autoCompact property exists");
 
55
        } else {
 
56
            DejaGnu.fail("SQLConnection::autoCompact property doesn't exist");
 
57
        }
 
58
        if (x1.cacheSize == uint) {
 
59
            DejaGnu.pass("SQLConnection::cacheSize property exists");
 
60
        } else {
 
61
            DejaGnu.fail("SQLConnection::cacheSize property doesn't exist");
 
62
        }
 
63
        if (x1.columnNameStyle == null) {
 
64
            DejaGnu.pass("SQLConnection::columnNameStyle property exists");
 
65
        } else {
 
66
            DejaGnu.fail("SQLConnection::columnNameStyle property doesn't exist");
 
67
        }
 
68
        if (x1.connected == false) {
 
69
            DejaGnu.pass("SQLConnection::connected property exists");
 
70
        } else {
 
71
            DejaGnu.fail("SQLConnection::connected property doesn't exist");
 
72
        }
 
73
        if (x1.inTransaction == false) {
 
74
            DejaGnu.pass("SQLConnection::inTransaction property exists");
 
75
        } else {
 
76
            DejaGnu.fail("SQLConnection::inTransaction property doesn't exist");
 
77
        }
 
78
        if (x1.lastInsertRowID == 0) {
 
79
            DejaGnu.pass("SQLConnection::lastInsertRowID property exists");
 
80
        } else {
 
81
            DejaGnu.fail("SQLConnection::lastInsertRowID property doesn't exist");
 
82
        }
 
83
        if (x1.pageSize == uint) {
 
84
            DejaGnu.pass("SQLConnection::pageSize property exists");
 
85
        } else {
 
86
            DejaGnu.fail("SQLConnection::pageSize property doesn't exist");
 
87
        }
 
88
        if (x1.totalChanges == 0) {
 
89
            DejaGnu.pass("SQLConnection::totalChanges property exists");
 
90
        } else {
 
91
            DejaGnu.fail("SQLConnection::totalChanges property doesn't exist");
 
92
        }
 
93
 
 
94
// Tests to see if all the methods exist. All these do is test for
 
95
// existance of a method, and don't test the functionality at all. This
 
96
// is primarily useful only to test completeness of the API implementation.
 
97
        if (x1.SQLConnection == SQLConnection) {
 
98
            DejaGnu.pass("SQLConnection::SQLConnection() method exists");
 
99
        } else {
 
100
            DejaGnu.fail("SQLConnection::SQLConnection() method doesn't exist");
 
101
        }
 
102
        if (x1.addEventListener == null) {
 
103
            DejaGnu.pass("SQLConnection::addEventListener() method exists");
 
104
        } else {
 
105
            DejaGnu.fail("SQLConnection::addEventListener() method doesn't exist");
 
106
        }
 
107
        if (x1.analyze == null) {
 
108
            DejaGnu.pass("SQLConnection::analyze() method exists");
 
109
        } else {
 
110
            DejaGnu.fail("SQLConnection::analyze() method doesn't exist");
 
111
        }
 
112
        if (x1.attach == null) {
 
113
            DejaGnu.pass("SQLConnection::attach() method exists");
 
114
        } else {
 
115
            DejaGnu.fail("SQLConnection::attach() method doesn't exist");
 
116
        }
 
117
        if (x1.begin == null) {
 
118
            DejaGnu.pass("SQLConnection::begin() method exists");
 
119
        } else {
 
120
            DejaGnu.fail("SQLConnection::begin() method doesn't exist");
 
121
        }
 
122
        if (x1.cancel == null) {
 
123
            DejaGnu.pass("SQLConnection::cancel() method exists");
 
124
        } else {
 
125
            DejaGnu.fail("SQLConnection::cancel() method doesn't exist");
 
126
        }
 
127
        if (x1.close == null) {
 
128
            DejaGnu.pass("SQLConnection::close() method exists");
 
129
        } else {
 
130
            DejaGnu.fail("SQLConnection::close() method doesn't exist");
 
131
        }
 
132
        if (x1.commit == null) {
 
133
            DejaGnu.pass("SQLConnection::commit() method exists");
 
134
        } else {
 
135
            DejaGnu.fail("SQLConnection::commit() method doesn't exist");
 
136
        }
 
137
        if (x1.compact == null) {
 
138
            DejaGnu.pass("SQLConnection::compact() method exists");
 
139
        } else {
 
140
            DejaGnu.fail("SQLConnection::compact() method doesn't exist");
 
141
        }
 
142
        if (x1.deanalyze == null) {
 
143
            DejaGnu.pass("SQLConnection::deanalyze() method exists");
 
144
        } else {
 
145
            DejaGnu.fail("SQLConnection::deanalyze() method doesn't exist");
 
146
        }
 
147
        if (x1.detach == null) {
 
148
            DejaGnu.pass("SQLConnection::detach() method exists");
 
149
        } else {
 
150
            DejaGnu.fail("SQLConnection::detach() method doesn't exist");
 
151
        }
 
152
        if (x1.getSchemaResult == SQLSchemaResult) {
 
153
            DejaGnu.pass("SQLConnection::getSchemaResult() method exists");
 
154
        } else {
 
155
            DejaGnu.fail("SQLConnection::getSchemaResult() method doesn't exist");
 
156
        }
 
157
        if (x1.loadSchema == null) {
 
158
            DejaGnu.pass("SQLConnection::loadSchema() method exists");
 
159
        } else {
 
160
            DejaGnu.fail("SQLConnection::loadSchema() method doesn't exist");
 
161
        }
 
162
        if (x1.open == null) {
 
163
            DejaGnu.pass("SQLConnection::open() method exists");
 
164
        } else {
 
165
            DejaGnu.fail("SQLConnection::open() method doesn't exist");
 
166
        }
 
167
        if (x1.openAsync == null) {
 
168
            DejaGnu.pass("SQLConnection::openAsync() method exists");
 
169
        } else {
 
170
            DejaGnu.fail("SQLConnection::openAsync() method doesn't exist");
 
171
        }
 
172
        if (x1.removeEventListener == null) {
 
173
            DejaGnu.pass("SQLConnection::removeEventListener() method exists");
 
174
        } else {
 
175
            DejaGnu.fail("SQLConnection::removeEventListener() method doesn't exist");
 
176
        }
 
177
        if (x1.rollback == null) {
 
178
            DejaGnu.pass("SQLConnection::rollback() method exists");
 
179
        } else {
 
180
            DejaGnu.fail("SQLConnection::rollback() method doesn't exist");
 
181
        }
 
182
 
 
183
        // Call this after finishing all tests. It prints out the totals.
 
184
        DejaGnu.done();
 
185
    }
 
186
}
 
187
 
 
188
// local Variables:
 
189
// mode: C++
 
190
// indent-tabs-mode: t
 
191
// End:
 
192