System.Data.SQLite
Check-in [984343ce67]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Revise and enhance tests for [58ed318f2f].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 984343ce673f3a6d81f0fe28a5fe718f567a77de
User & Date: mistachkin 2014-08-12 19:40:24
Context
2014-08-14
04:22
Correct several tests. check-in: b85106c760 user: mistachkin tags: trunk
2014-08-12
19:40
Revise and enhance tests for [58ed318f2f]. check-in: 984343ce67 user: mistachkin tags: trunk
19:19
Add NoConvertSettings connection flag to disable querying of runtime configuration settings from within the SQLiteConvert class. Pursuant to [58ed318f2f]. check-in: 59d43c48bb user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to Tests/tkt-58ed318f2f.eagle.

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
..
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
...
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
...
151
152
153
154
155
156
157
158
159


























































































































160
161
162
163
164
165
166
...
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
...
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
...
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  sql execute -execute reader -format list $db "SELECT x, y FROM t1;"

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == 2 && \
      [getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}
................................................................................
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  sql execute -execute reader -format list $db "SELECT x, y FROM t1;"

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == 2 && \
      [getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}
................................................................................
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  sql execute -execute reader -format list $db "SELECT x, y FROM t1;"

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == -1 && \
      [getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}
................................................................................
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  sql execute -execute reader -format list $db "SELECT x, y FROM t1;"

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == -1 && \
      [getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}
................................................................................

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.5 {zero DefaultDbType settings read} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.5.db] "" "" "" NoConvertSettings


























































































































} -body {
  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

................................................................................

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.6 {zero DefaultTypeName settings read} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.6.db] "" "" "" NoConvertSettings
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
................................................................................

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.7 {normal SQLiteConvert settings usage} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.7.db]
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
................................................................................

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.8 {zero SQLiteConvert settings usage} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.8.db] "" "" "" NoConvertSettings
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');







|
<







 







|
<







 







|
<







 







|
<







 







|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
|







 







|
|







 







|
|







52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
..
78
79
80
81
82
83
84
85

86
87
88
89
90
91
92
...
105
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
...
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
...
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
...
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  sql execute -execute reader -format list $db "SELECT x, y FROM t1;"

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == 2}

} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}
................................................................................
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  sql execute -execute reader -format list $db "SELECT x, y FROM t1;"

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == 2}

} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}
................................................................................
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  sql execute -execute reader -format list $db "SELECT x, y FROM t1;"

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == -1}

} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}
................................................................................
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  sql execute -execute reader -format list $db "SELECT x, y FROM t1;"

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == -1}

} -cleanup {
  cleanupDb $fileName

  unset -nocomplain db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}
................................................................................

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.5 {standard GetDefaultTypeName usage} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.5.db]
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  set columns [$connection GetSchema COLUMNS]

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == 2}
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  unset -nocomplain columns connection db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.6 {no property GetDefaultTypeName usage} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.6.db] "" "" "" UseConnectionTypes
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  set columns [$connection GetSchema COLUMNS]

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == 2}
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  unset -nocomplain columns connection db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.7 {no flag GetDefaultTypeName usage} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.7.db] "" "" "" "" \
      "DefaultDbType=String;"
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  set columns [$connection GetSchema COLUMNS]

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  unset -nocomplain columns connection db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.8 {zero GetDefaultTypeName usage} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.8.db] "" "" "" UseConnectionTypes \
      "DefaultTypeName=TEXT;"
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

  set columns [$connection GetSchema COLUMNS]

  expr {[getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  unset -nocomplain columns connection db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
buildConfiguration.Debug} -result {True}}

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.9 {zero DefaultDbType settings read} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.9.db] "" "" "" NoConvertSettings
} -body {
  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
  }

................................................................................

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.10 {zero DefaultTypeName settings read} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.10.db] "" "" "" NoConvertSettings
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
................................................................................

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.11 {normal SQLiteConvert settings usage} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.11.db]
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');
................................................................................

###############################################################################

reportSQLiteResources $test_channel true

###############################################################################

runTest {test tkt-58ed318f2f-1.12 {zero SQLiteConvert settings usage} -setup {
  setupDb [set fileName tkt-58ed318f2f-1.12.db] "" "" "" NoConvertSettings
} -body {
  set connection [getDbConnection]

  sql execute $db {
    CREATE TABLE t1(x, y);
    INSERT INTO t1 (x, y) VALUES(0, 1);
    INSERT INTO t1 (x, y) VALUES('0', '1');