System.Data.SQLite
Check-in [67e11dee53]
Not logged in

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

Overview
Comment:Corrections to the test case for ticket [53633bbe39].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 67e11dee533df83e7001b32202651ada20d8c9f0
User & Date: mistachkin 2016-04-01 00:43:09
Context
2016-04-01
02:35
Add a row to the LINQ test database for ticket [eafaece5c1]. check-in: 47ec08ca31 user: mistachkin tags: trunk
00:43
Corrections to the test case for ticket [53633bbe39]. check-in: 67e11dee53 user: mistachkin tags: trunk
00:23
Add tests for ticket [53633bbe39]. check-in: 8b5a097e13 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/tkt-53633bbe39.eagle.

20
21
22
23
24
25
26
27


28
29
30
31
32
33
34
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56


57
58
59
60
61
62
63


64
65
66
67
68

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

runTest {test tkt-53633bbe39-1.1 {column affinity overrides} -setup {
  saveSQLiteConnectionEnvironment
  saveSQLiteConvertEnvironment

  set env(DefaultFlags_SQLiteConnection) "DetectTextAffinity, DetectStringType"


  set env(Use_SQLiteConvert_DefaultDbType) String
  set env(Use_SQLiteConvert_DefaultTypeName) TEXT

  setupDb [set fileName tkt-53633bbe39-1.1.db]
} -body {
  sql execute $db {
    CREATE TABLE t1(x);
................................................................................

  set dataReader [sql execute -execute reader -format datareader \
      -alias $db "SELECT x FROM t1 ORDER BY x;"]

  set results [list]

  while {[$dataReader Read]} {
    set result [list]

    lappend result [catch {$dataReader GetString 0} result] $result
    lappend result [catch {$dataReader GetValue 0} result] $result

    lappend results $result
  }

  set results
} -cleanup {


  cleanupDb $fileName
  restoreSQLiteConvertEnvironment
  restoreSQLiteConnectionEnvironment

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



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

runSQLiteTestEpilogue
runTestEpilogue







|
>
>







 







|

|
|

|




>
>






|
>
>





20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

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

runTest {test tkt-53633bbe39-1.1 {column affinity overrides} -setup {
  saveSQLiteConnectionEnvironment
  saveSQLiteConvertEnvironment

  set env(DefaultFlags_SQLiteConnection) \
      "DetectTextAffinity, DetectStringType, NoVerifyTextAffinity"

  set env(Use_SQLiteConvert_DefaultDbType) String
  set env(Use_SQLiteConvert_DefaultTypeName) TEXT

  setupDb [set fileName tkt-53633bbe39-1.1.db]
} -body {
  sql execute $db {
    CREATE TABLE t1(x);
................................................................................

  set dataReader [sql execute -execute reader -format datareader \
      -alias $db "SELECT x FROM t1 ORDER BY x;"]

  set results [list]

  while {[$dataReader Read]} {
    set result(0) [list]

    lappend result(0) [catch {$dataReader GetString 0} result(1)] $result(1)
    lappend result(0) [catch {$dataReader GetValue 0} result(1)] $result(1)

    lappend results $result(0)
  }

  set results
} -cleanup {
  unset -nocomplain dataReader

  cleanupDb $fileName
  restoreSQLiteConvertEnvironment
  restoreSQLiteConnectionEnvironment

  unset -nocomplain result results db fileName savedEnv
} -constraints \
{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \
regexp -result {^\{0 \{\} 0 System#DBNull#\d+\} \{0 1 0 1\} \{0 2\.0 0 2\.0\}\
\{0 3\.14159 0 3\.14159\}$}}

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

runSQLiteTestEpilogue
runTestEpilogue