Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Correct a couple tests due to time zone and DateTime parsing issues. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
fb04defd96fb11d43d6fa1c1a81db583 |
User & Date: | mistachkin 2016-06-21 20:05:58.855 |
Context
2016-06-21
| ||
20:07 | Update a test suite infrastructure procedure to account for a breaking change in Eagle beta 36. check-in: 77b9528eea user: mistachkin tags: trunk | |
20:05 | Correct a couple tests due to time zone and DateTime parsing issues. check-in: fb04defd96 user: mistachkin tags: trunk | |
19:04 | Make the 'speed-1.1' test result compatible with Windows 10. check-in: 8ae0e6da88 user: mistachkin tags: trunk | |
Changes
Changes to Tests/basic.eagle.
︙ | ︙ | |||
1111 1112 1113 1114 1115 1116 1117 | # # The basic problem here is that the Parse [and TryParse] methods of # the DateTime structure seem to always return local time, even when # string value clearly indicates otherwise (i.e. the trailing "Z", # indicating UTC). # expr {round([object invoke System.Data.SQLite.SQLiteConvert ToUnixEpoch \ | > | > > | | 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 | # # The basic problem here is that the Parse [and TryParse] methods of # the DateTime structure seem to always return local time, even when # string value clearly indicates otherwise (i.e. the trailing "Z", # indicating UTC). # expr {round([object invoke System.Data.SQLite.SQLiteConvert ToUnixEpoch \ [set dateTime [object invoke -create -alias DateTime ParseExact \ "2012-01-01 12:00:00Z" [getDateTimeFormat] null AdjustToUniversal]]])} } -cleanup { unset -nocomplain dateTime } -constraints {eagle command.object monoBug42 System.Data.SQLite} -result \ {1325419200}} ############################################################################### runTest {test data-1.21 {SQLiteConvert ToUnixEpoch (Local)} -body { # # NOTE: At first, the test result here may not seem correct; however, the # same result can be seen by compiling and running the following C# |
︙ | ︙ | |||
2498 2499 2500 2501 2502 2503 2504 | runTest {test data-1.53 {BindAllAsText w/DateTime} -setup { setupDb [set fileName data-1.53.db] "" Ticks Utc BindAllAsText } -body { sql execute $db "CREATE TABLE t1(x);" list [sql execute $db "INSERT INTO t1 (x) VALUES(?);" \ | | | > | | | 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 | runTest {test data-1.53 {BindAllAsText w/DateTime} -setup { setupDb [set fileName data-1.53.db] "" Ticks Utc BindAllAsText } -body { sql execute $db "CREATE TABLE t1(x);" list [sql execute $db "INSERT INTO t1 (x) VALUES(?);" \ [list param1 DateTime [set dateTime [object invoke -create \ DateTime ParseExact "2000-02-29 13:59:58.1234567Z" \ [getDateTimeFormat] null AdjustToUniversal]]]] [sql execute \ -execute reader -format list $db "SELECT x FROM t1;"] } -cleanup { cleanupDb $fileName unset -nocomplain dateTime db fileName } -constraints {eagle command.object monoBug28 monoBug42 command.sql\ compile.DATA SQLite System.Data.SQLite} -result {1 630874295981234567}} ############################################################################### runTest {test data-1.54 {bind function to a connection} -setup { set fileName data-1.54.db } -body { set id [object invoke Interpreter.GetActive NextId] |
︙ | ︙ |