System.Data.SQLite

Check-in [bafc84af30]
Login

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

Overview
Comment:Further simplify test case for [e1b2e0f769]. Prevent common.eagle from being treated as a test case file.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bafc84af30757cd707034b6773d719c09b1684f0
User & Date: mistachkin 2011-07-06 21:09:34.734
Context
2011-07-07
02:15
Fix for ticket [e1b2e0f769] with test case. check-in: fa8d4d5773 user: mistachkin tags: trunk
2011-07-06
21:09
Further simplify test case for [e1b2e0f769]. Prevent common.eagle from being treated as a test case file. check-in: bafc84af30 user: mistachkin tags: trunk
20:59
Modify test case for [e1b2e0f769] to allow the reported exception to be reproduced. check-in: 9a1cb354ec user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/all.eagle.
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

#
# NOTE: Run all the unit tests.
#
set test_time [time {
  runAllTests $test_channel $path \
    [getTestFiles [list $path] $test_flags(-file) $test_flags(-notFile)] \
    [list [file tail [info script]] \
    *.tcl pkgIndex.eagle constraints.eagle epilogue.eagle prologue.eagle]
}]

#
# NOTE: Run the local test epilogue, if any.
#
if {[file exists [file join $path epilogue.eagle]]} then {
  source [file join $path epilogue.eagle]







|
|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

#
# NOTE: Run all the unit tests.
#
set test_time [time {
  runAllTests $test_channel $path \
    [getTestFiles [list $path] $test_flags(-file) $test_flags(-notFile)] \
    [list [file tail [info script]] *.tcl pkgIndex.eagle common.eagle \
    constraints.eagle epilogue.eagle prologue.eagle]
}]

#
# NOTE: Run the local test epilogue, if any.
#
if {[file exists [file join $path epilogue.eagle]]} then {
  source [file join $path epilogue.eagle]
Changes to Tests/tkt-e1b2e0f769.eagle.
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  copyAssembly SQLite.Interop.dll
  copyAssembly System.Data.SQLite.dll
  setupDb [set fileName tkt-e1b2e0f769-1.1.db]
} -body {
  sql execute $db "CREATE TABLE t1(x INTEGER);"
  sql execute $db "CREATE TABLE t2(x INTEGER);"

  foreach x [list 1 2 3 NULL] {
    sql execute $db "INSERT INTO t1 (x) VALUES($x);"
  }

  set result1 [list]
  set dataSource [file join [getTemporaryPath] tkt-e1b2e0f769-1.1.db]

  foreach table [list t1 t2] {







|







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  copyAssembly SQLite.Interop.dll
  copyAssembly System.Data.SQLite.dll
  setupDb [set fileName tkt-e1b2e0f769-1.1.db]
} -body {
  sql execute $db "CREATE TABLE t1(x INTEGER);"
  sql execute $db "CREATE TABLE t2(x INTEGER);"

  foreach x [list 1 2 3] {
    sql execute $db "INSERT INTO t1 (x) VALUES($x);"
  }

  set result1 [list]
  set dataSource [file join [getTemporaryPath] tkt-e1b2e0f769-1.1.db]

  foreach table [list t1 t2] {
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
                  {
                    connection.Close();
                    return result;
                  }

                  while (dataReader.Read())
                  {
                    if (!dataReader.IsDBNull(0))
                      result.Add((long?) dataReader\[0\]);
                  }
                } // NOTE: Exception here when no data rows (see comment above).
              }

              transaction.Rollback();
            }

            connection.Close();
            return result;
          }

          public static int Main()







<
|



<
<







71
72
73
74
75
76
77

78
79
80
81


82
83
84
85
86
87
88
                  {
                    connection.Close();
                    return result;
                  }

                  while (dataReader.Read())
                  {

                    result.Add((long?) dataReader\[0\]);
                  }
                } // NOTE: Exception here when no data rows (see comment above).
              }


            }

            connection.Close();
            return result;
          }

          public static int Main()
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
        } result2] : [set result2 ""]}] $result2
  }

  set result1
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result2 result1 code results errors sql dataSource id x db \
      fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA System.Data.SQLite} -match regexp \
-result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 3 Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 1 \{.* Connection was closed,\
statement was terminated\s.*\}$}}

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

runTestEpilogue







|
|









108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
        } result2] : [set result2 ""]}] $result2
  }

  set result1
} -cleanup {
  cleanupDb $fileName

  unset -nocomplain result2 result1 code results errors sql table dataSource \
      id x db fileName
} -constraints \
{eagle monoBug28 command.sql compile.DATA System.Data.SQLite} -match regexp \
-result {^Ok System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 3 Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 1 \{.* Connection was closed,\
statement was terminated\s.*\}$}}

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

runTestEpilogue