Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Enhance test suite infrastructure to make it work properly without the interop assembly. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
e161b486c4d9b0f04e21838968f23161 |
User & Date: | mistachkin 2015-08-12 20:15:41 |
Context
2015-08-12
| ||
20:24 | Enhance the clean batch tool for Visual Studio 2015. check-in: 21952064b2 user: mistachkin tags: trunk | |
20:15 | Enhance test suite infrastructure to make it work properly without the interop assembly. check-in: e161b486c4 user: mistachkin tags: trunk | |
19:59 | Revise and extend compilation fixes from the previous check-in. check-in: 9582604b8d user: mistachkin tags: trunk | |
Changes
Changes to Tests/basic.eagle.
2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 .... 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 .... 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 .... 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 .... 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 |
"SELECT replicate('1234', 4);"} output] $output set result } -cleanup { cleanupDb $fileName unset -nocomplain output result db fileName } -constraints \ {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -match \ regexp -result {^0 12341234 1 \{System\.Data\.SQLite\.SQLiteException\ \(0x80004005\): SQL logic error or missing database.*?\} 0 1234123412341234$}} ############################################################################### runTest {test data-1.50 {column name and index lookup} -setup { setupDb [set fileName data-1.50.db] } -body { sql execute $db { ................................................................................ unset -nocomplain result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {1 {} 1.01 {}}} ############################################################################### runTest {test data-1.57 {regexp extension} -setup { setupDb [set fileName data-1.57.db] } -body { unset -nocomplain pattern result ................................................................................ unset -nocomplain pattern result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {0 1 1 {unmatched '('} 0 1 1 {unmatched '('} 0 0 1\ {unmatched '('} 0 0 1 {unmatched '('}}} ############################################################################### reportSQLiteResources $test_channel ############################################################################### ................................................................................ unset -nocomplain result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -result {0 4 -1 1.75}} ############################################################################### runTest {test data-1.60 {per-connection type mappings} -setup { setupDb [set fileName data-1.60.db] "" "" "" UseConnectionTypes } -body { set connection [getDbConnection] ................................................................................ unset -nocomplain x result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite} -match regexp -result {^\{fts5: \d{4}-\d{2}-\d{2}\ \d{2}:\d{2}:\d{2} [0-9a-f]{40}\} \{\} \{\} \{\} \{\} \{\} \{rowid 3 x horse\ rowid 4 x house\}$}} ############################################################################### runTest {test data-1.72 {unbind function from a connection} -setup { set fileName data-1.72.db } -body { set id [object invoke Interpreter.GetActive NextId] |
| | > | | | | | | | | | |
2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 .... 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 .... 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 .... 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 .... 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 |
"SELECT replicate('1234', 4);"} output] $output set result } -cleanup { cleanupDb $fileName unset -nocomplain output result db fileName } -constraints {eagle monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop\ defineConstant.System.Data.SQLite.INTEROP_EXTENSION_FUNCTIONS} -match regexp \ -result {^0 12341234 1 \{System\.Data\.SQLite\.SQLiteException \(0x80004005\):\ SQL logic error or missing database.*?\} 0 1234123412341234$}} ############################################################################### runTest {test data-1.50 {column name and index lookup} -setup { setupDb [set fileName data-1.50.db] } -body { sql execute $db { ................................................................................ unset -nocomplain result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop} -result {1 {} 1.01 {}}} ############################################################################### runTest {test data-1.57 {regexp extension} -setup { setupDb [set fileName data-1.57.db] } -body { unset -nocomplain pattern result ................................................................................ unset -nocomplain pattern result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop} -result {0 1 1 {unmatched '('} 0 1 1\ {unmatched '('} 0 0 1 {unmatched '('} 0 0 1 {unmatched '('}}} ############################################################################### reportSQLiteResources $test_channel ############################################################################### ................................................................................ unset -nocomplain result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop} -result {0 4 -1 1.75}} ############################################################################### runTest {test data-1.60 {per-connection type mappings} -setup { setupDb [set fileName data-1.60.db] "" "" "" UseConnectionTypes } -body { set connection [getDbConnection] ................................................................................ unset -nocomplain x result connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop} -match regexp -result \ {^\{fts5: \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} [0-9a-f]{40}\} \{\} \{\} \{\}\ \{\} \{\} \{rowid 3 x horse rowid 4 x house\}$}} ############################################################################### runTest {test data-1.72 {unbind function from a connection} -setup { set fileName data-1.72.db } -body { set id [object invoke Interpreter.GetActive NextId] |
Changes to Tests/linq.eagle.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
} else { lappend result [string trim $error] } set result } -cleanup { unset -nocomplain code output error result } -constraints {eagle monoToDo SQLite file_System.Data.SQLite.dll testExec\ file_System.Data.SQLite.Linq.dll file_testlinq.exe file_northwindEF.db} \ -result {0 {{ NewUnitPrice = 21.0 } { NewUnitPrice = 21.1 } { NewUnitPrice =\ 21.05 } { NewUnitPrice = 23.0 } { NewUnitPrice = 23.3 } { NewUnitPrice = 23.25\ } { NewUnitPrice = 21.0 } { NewUnitPrice = 21.4 } { NewUnitPrice = 21.35 }}}} ############################################################################### runSQLiteTestFilesEpilogue runSQLiteTestEpilogue runTestEpilogue |
> | | | | | |
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
} else { lappend result [string trim $error] } set result } -cleanup { unset -nocomplain code output error result } -constraints {eagle System.Data.SQLite.dll_v4.0.30319 monoToDo SQLite\ file_System.Data.SQLite.dll testExec file_System.Data.SQLite.Linq.dll\ file_testlinq.exe file_northwindEF.db} -result {0 {{ NewUnitPrice = 21.0 } {\ NewUnitPrice = 21.1 } { NewUnitPrice = 21.05 } { NewUnitPrice = 23.0 } {\ NewUnitPrice = 23.3 } { NewUnitPrice = 23.25 } { NewUnitPrice = 21.0 } {\ NewUnitPrice = 21.4 } { NewUnitPrice = 21.35 }}}} ############################################################################### runSQLiteTestFilesEpilogue runSQLiteTestEpilogue runTestEpilogue |
Changes to Tests/tkt-964063da16.eagle.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=False;"] $connection Flags NoExtensionFunctions; $connection Open $connection Flags } -cleanup { unset -nocomplain connection } -constraints {eagle command.object SQLite System.Data.SQLite} -result \ {NoExtensionFunctions, Default}} ############################################################################### runTest {test tkt-964063da16-1.4 {pre-existing connection flags} -body { set connection [object create -alias \ System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=True;"] |
| | |
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=False;"] $connection Flags NoExtensionFunctions; $connection Open $connection Flags } -cleanup { unset -nocomplain connection } -constraints {eagle command.object SQLite System.Data.SQLite} -match regexp \ -result {^(?:Default, NoExtensionFunctions|NoExtensionFunctions, Default)$}} ############################################################################### runTest {test tkt-964063da16-1.4 {pre-existing connection flags} -body { set connection [object create -alias \ System.Data.SQLite.SQLiteConnection \ "Data Source=:memory:;NoDefaultFlags=True;"] |
Changes to lib/System.Data.SQLite/common.eagle.
1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 |
# so, make it easy to spot.
#
if {[string length $sourceId] == 0} then {
set sourceId null
}
#
# NOTE: Yes, the SQLite interop assembly appears to be available.
#
addConstraint SQLiteInterop
tputs $channel [appendArgs "yes (" $version " " $sourceId ")\n"]
} else {
tputs $channel no\n
}
}
proc checkForSQLiteDefineConstant { channel name } {
tputs $channel [appendArgs \
|
> > > > > | | | > > > > > | |
1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 |
# so, make it easy to spot. # if {[string length $sourceId] == 0} then { set sourceId null } # # NOTE: Before actually adding the test constraint, make sure the # version is valid (i.e. not just that we could query it). # if {$version ne "null"} then { # # NOTE: Yes, the SQLite interop assembly appears to be available. # addConstraint SQLiteInterop set answer yes } else { set answer no } tputs $channel [appendArgs $answer " (" $version " " $sourceId ")\n"] } else { tputs $channel no\n } } proc checkForSQLiteDefineConstant { channel name } { tputs $channel [appendArgs \ |