1
// SQLConnection_as.hx: ActionScript 3 "SQLConnection" class, for Gnash.
3
// Generated by gen-as3.sh on: 20090514 by "rob". Remove this
4
// after any hand editing loosing changes.
6
// Copyright (C) 2009 Free Software Foundation, Inc.
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.
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.
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
23
// This test case must be processed by CPP before compiling to include the
24
// DejaGnu.hx header file for the testing framework support.
27
import flash.data.SQLConnection;
28
import flash.display.MovieClip;
30
import flash.SQLConnection;
31
import flash.MovieClip;
36
// import our testing API
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();
44
// Make sure we actually get a valid class
46
DejaGnu.pass("SQLConnection class exists");
48
DejaGnu.fail("SQLConnection lass doesn't exist");
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");
56
DejaGnu.fail("SQLConnection::autoCompact property doesn't exist");
58
if (x1.cacheSize == uint) {
59
DejaGnu.pass("SQLConnection::cacheSize property exists");
61
DejaGnu.fail("SQLConnection::cacheSize property doesn't exist");
63
if (x1.columnNameStyle == null) {
64
DejaGnu.pass("SQLConnection::columnNameStyle property exists");
66
DejaGnu.fail("SQLConnection::columnNameStyle property doesn't exist");
68
if (x1.connected == false) {
69
DejaGnu.pass("SQLConnection::connected property exists");
71
DejaGnu.fail("SQLConnection::connected property doesn't exist");
73
if (x1.inTransaction == false) {
74
DejaGnu.pass("SQLConnection::inTransaction property exists");
76
DejaGnu.fail("SQLConnection::inTransaction property doesn't exist");
78
if (x1.lastInsertRowID == 0) {
79
DejaGnu.pass("SQLConnection::lastInsertRowID property exists");
81
DejaGnu.fail("SQLConnection::lastInsertRowID property doesn't exist");
83
if (x1.pageSize == uint) {
84
DejaGnu.pass("SQLConnection::pageSize property exists");
86
DejaGnu.fail("SQLConnection::pageSize property doesn't exist");
88
if (x1.totalChanges == 0) {
89
DejaGnu.pass("SQLConnection::totalChanges property exists");
91
DejaGnu.fail("SQLConnection::totalChanges property doesn't exist");
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");
100
DejaGnu.fail("SQLConnection::SQLConnection() method doesn't exist");
102
if (x1.addEventListener == null) {
103
DejaGnu.pass("SQLConnection::addEventListener() method exists");
105
DejaGnu.fail("SQLConnection::addEventListener() method doesn't exist");
107
if (x1.analyze == null) {
108
DejaGnu.pass("SQLConnection::analyze() method exists");
110
DejaGnu.fail("SQLConnection::analyze() method doesn't exist");
112
if (x1.attach == null) {
113
DejaGnu.pass("SQLConnection::attach() method exists");
115
DejaGnu.fail("SQLConnection::attach() method doesn't exist");
117
if (x1.begin == null) {
118
DejaGnu.pass("SQLConnection::begin() method exists");
120
DejaGnu.fail("SQLConnection::begin() method doesn't exist");
122
if (x1.cancel == null) {
123
DejaGnu.pass("SQLConnection::cancel() method exists");
125
DejaGnu.fail("SQLConnection::cancel() method doesn't exist");
127
if (x1.close == null) {
128
DejaGnu.pass("SQLConnection::close() method exists");
130
DejaGnu.fail("SQLConnection::close() method doesn't exist");
132
if (x1.commit == null) {
133
DejaGnu.pass("SQLConnection::commit() method exists");
135
DejaGnu.fail("SQLConnection::commit() method doesn't exist");
137
if (x1.compact == null) {
138
DejaGnu.pass("SQLConnection::compact() method exists");
140
DejaGnu.fail("SQLConnection::compact() method doesn't exist");
142
if (x1.deanalyze == null) {
143
DejaGnu.pass("SQLConnection::deanalyze() method exists");
145
DejaGnu.fail("SQLConnection::deanalyze() method doesn't exist");
147
if (x1.detach == null) {
148
DejaGnu.pass("SQLConnection::detach() method exists");
150
DejaGnu.fail("SQLConnection::detach() method doesn't exist");
152
if (x1.getSchemaResult == SQLSchemaResult) {
153
DejaGnu.pass("SQLConnection::getSchemaResult() method exists");
155
DejaGnu.fail("SQLConnection::getSchemaResult() method doesn't exist");
157
if (x1.loadSchema == null) {
158
DejaGnu.pass("SQLConnection::loadSchema() method exists");
160
DejaGnu.fail("SQLConnection::loadSchema() method doesn't exist");
162
if (x1.open == null) {
163
DejaGnu.pass("SQLConnection::open() method exists");
165
DejaGnu.fail("SQLConnection::open() method doesn't exist");
167
if (x1.openAsync == null) {
168
DejaGnu.pass("SQLConnection::openAsync() method exists");
170
DejaGnu.fail("SQLConnection::openAsync() method doesn't exist");
172
if (x1.removeEventListener == null) {
173
DejaGnu.pass("SQLConnection::removeEventListener() method exists");
175
DejaGnu.fail("SQLConnection::removeEventListener() method doesn't exist");
177
if (x1.rollback == null) {
178
DejaGnu.pass("SQLConnection::rollback() method exists");
180
DejaGnu.fail("SQLConnection::rollback() method doesn't exist");
183
// Call this after finishing all tests. It prints out the totals.
190
// indent-tabs-mode: t