System.Data.SQLite

Check-in [cf56f17881]
Login

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

Overview
Comment:Test case updates.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | tkt-01f20ea55a
Files: files | file ages | folders
SHA1: cf56f1788143e198252b754fa5113ce786b6230c
User & Date: mistachkin 2016-10-10 21:37:40.523
Context
2016-10-10
21:37
Test case updates. Closed-Leaf check-in: cf56f17881 user: mistachkin tags: tkt-01f20ea55a
20:58
Add initial test cases for ticket [01f20ea55a]. check-in: 5d35df2f75 user: mistachkin tags: tkt-01f20ea55a
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to Tests/tkt-01f20ea55a.eagle.
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
30
31
32
33
34
35
36





37
38
39
40
41
42
43







-
-
-
-
-







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

set instanceValue(0) [object create -alias DateTime $ticksValue(0)]
set instanceValue(1) [object create -alias DateTime $ticksValue(1) Utc]

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

set iso8601Value(0) [$instanceValue(0) ToString [getDateTimeFormat]]
set iso8601Value(1) [$instanceValue(1) ToString [getDateTimeFormat]]

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

runTest {test tkt-01f20ea55a-1.1 {DateTimeKind with DataTable} -setup {
  proc dateTimeValueCallback { dataTable dataRow index value } {
    if {[object isoftype $value DateTime]} then {
      return [list [$value Kind] [$value ToString [getDateTimeFormat]]]
    } else {
      continue
    }
67
68
69
70
71
72
73








74
75
76
77

78
79
80
81
82
83
84
85
86
87
88
89


90
91
92
93

94
95
96
97
98
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

80
81
82
83
84
85
86
87
88
89
90


91
92
93
94
95

96
97
98
99
100
101







+
+
+
+
+
+
+
+



-
+










-
-
+
+



-
+





  $command CommandText {SELECT x, y FROM t1 ORDER BY x;}

  set dataAdapter [object create -alias \
      System.Data.SQLite.SQLiteDataAdapter $command]

  set dataTable [object create -alias System.Data.DataTable]

  set dataColumn(x) [object create -alias System.Data.DataColumn x]
  set dataColumn(y) [object create -alias System.Data.DataColumn y]

  $dataColumn(y) DataType DateTime; $dataColumn(y) DateTimeMode Utc

  $dataTable Columns.Add $dataColumn(x)
  $dataTable Columns.Add $dataColumn(y)

  $dataAdapter Fill $dataTable
  getRowsFromDataTable $dataTable dateTimeValueCallback
} -cleanup {
  unset -nocomplain dataTable dataAdapter command
  unset -nocomplain dataColumn dataTable dataAdapter command

  freeDbConnection

  cleanupDb $fileName

  unset -nocomplain connection db fileName

  rename dateTimeValueCallback ""
} -constraints {eagle command.object monoBug28 monoBug211 command.sql\
compile.DATA SQLite System.Data.SQLite} -result {{{x 1} y} {{x 2} {y\
{Unspecified {2016-10-01 12:34:56.8765401}}}} {{x 3} {y {Utc {2016-10-01\
12:34:56.8765401}}}}}}
{Utc {2016-10-01 12:34:56.8765401Z}}}} {{x 3} {y {Utc {2016-10-01\
12:34:56.8765401Z}}}}}}

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

unset -nocomplain iso8601Value instanceValue ticksValue rawValue
unset -nocomplain instanceValue ticksValue rawValue

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

runSQLiteTestEpilogue
runTestEpilogue