Index: Tests/stress.eagle ================================================================== --- Tests/stress.eagle +++ Tests/stress.eagle @@ -152,15 +152,15 @@ setupDb $dstFileName "" "" "" "" "" true false if {[catch { for {set index 2} {$index <= $count} {incr index} { sql execute $db [appendArgs \ "CREATE TABLE IF NOT EXISTS t" $index "(x PRIMARY KEY, y, z);"] - showTest 1 + showTest A } } error]} then { if {[expectedError $error]} then { - showTest * + showTest a } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -177,15 +177,15 @@ setupDb $dstFileName "" "" "" "" "" true false if {[catch { for {set index 2} {$index <= $count} {incr index} { sql execute $db [appendArgs \ "DROP TABLE IF EXISTS t" $index \;] - showTest 2 + showTest B } } error]} then { if {[expectedError $error]} then { - showTest * + showTest b } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -202,15 +202,15 @@ setupDb $dstFileName "" "" "" "" "" true false if {[catch { for {set index 1} {$index <= $count} {incr index} { sql execute -execute reader $db [appendArgs \ "SELECT x, y FROM " $table " WHERE z = 'small';"] - showTest 3 + showTest C } } error]} then { if {[expectedError $error]} then { - showTest * + showTest c } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -227,15 +227,15 @@ setupDb $dstFileName "" "" "" "" "" true false if {[catch { for {set index 1} {$index <= $count} {incr index} { sql execute -execute reader $db [appendArgs \ "SELECT x, y FROM " $table " WHERE z = 'big';"] - showTest 4 + showTest D } } error]} then { if {[expectedError $error]} then { - showTest * + showTest d } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -255,15 +255,15 @@ sql execute $db [appendArgs \ "INSERT INTO " $table "(x, y, z) VALUES('" \ [format %lX [expr {random()}]] "', '" \ [base64 encode -- [expr {randstr(10000)}]] \ "', 'small');"] - showTest 5 + showTest E } } error]} then { if {[expectedError $error]} then { - showTest * + showTest e } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -282,15 +282,15 @@ for {set index 1} {$index <= $count} {incr index} { sql execute $db [appendArgs \ "INSERT INTO " $table "(x, y, z) VALUES('" \ [format %lX [expr {random()}]] \ "', RANDOMBLOB(10000000), 'big');"] - showTest 6 + showTest F } } error]} then { if {[expectedError $error]} then { - showTest * + showTest f } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -308,15 +308,15 @@ if {[catch { for {set index 1} {$index <= $count} {incr index} { sql execute $db [appendArgs "UPDATE " $table \ " SET y = '" [base64 encode -- [expr {randstr(10000)}]] \ "' WHERE x LIKE '" [format %X $index] "%' AND z = 'small';"] - showTest 7 + showTest G } } error]} then { if {[expectedError $error]} then { - showTest * + showTest g } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -334,15 +334,15 @@ if {[catch { for {set index 1} {$index <= $count} {incr index} { sql execute $db [appendArgs "UPDATE " $table \ " SET y = RANDOMBLOB(10000000) WHERE x LIKE '" \ [format %X $index] "%' AND z = 'big';"] - showTest 8 + showTest H } } error]} then { if {[expectedError $error]} then { - showTest * + showTest h } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -359,15 +359,15 @@ setupDb $dstFileName "" "" "" "" "" true false if {[catch { for {set index 1} {$index <= $count} {incr index} { sql execute $db [appendArgs "DELETE FROM " $table \ " WHERE x LIKE '" [format %X $index] "%' AND z = 'small';"] - showTest 9 + showTest I } } error]} then { if {[expectedError $error]} then { - showTest * + showTest i } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -384,15 +384,15 @@ setupDb $dstFileName "" "" "" "" "" true false if {[catch { for {set index 1} {$index <= $count} {incr index} { sql execute $db [appendArgs "DELETE FROM " $table \ " WHERE x LIKE '" [format %X $index] "%' AND z = 'big';"] - showTest A + showTest J } } error]} then { if {[expectedError $error]} then { - showTest * + showTest j } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -408,15 +408,15 @@ lappend ::times(11) [lindex [time { setupDb $dstFileName "" "" "" "" "" true false if {[catch { for {set index 1} {$index <= $count} {incr index} { sql execute $db "VACUUM;" - showTest B + showTest K } } error]} then { if {[expectedError $error]} then { - showTest * + showTest k } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -431,11 +431,20 @@ # lappend ::times(12) [lindex [time { for {set index 1} {$index <= $count} {incr index} { if {[string is integer -strict $::compiled(12)]} then { set id $::compiled(12); # NOTE: Already compiled. - object invoke _Dynamic${id}.Test${id} BackupAndGetData + if {[catch { + object invoke _Dynamic${id}.Test${id} BackupAndGetData + showTest L + } error]} then { + if {[expectedError $error]} then { + showTest l + } else { + failTest $error + } + } } else { set id [object invoke Interpreter.GetActive NextId] set code [compileCSharpWith [subst { using System; using System.Data.SQLite; @@ -471,16 +480,24 @@ } } }] true true true results errors System.Data.SQLite.dll] if {$code eq "Ok"} then { set ::compiled(12) $id; # NOTE: Compiled OK. - object invoke _Dynamic${id}.Test${id} BackupAndGetData + if {[catch { + object invoke _Dynamic${id}.Test${id} BackupAndGetData + showTest L + } error]} then { + if {[expectedError $error]} then { + showTest l + } else { + failTest $error + } + } } else { error $errors } } - showTest C } }] 0] }] ############################################################################# @@ -491,11 +508,20 @@ # lappend ::times(13) [lindex [time { for {set index 1} {$index <= $count} {incr index} { if {[string is integer -strict $::compiled(13)]} then { set id $::compiled(13); # NOTE: Already compiled. - object invoke _Dynamic${id}.Test${id} BackupAndGetData + if {[catch { + object invoke _Dynamic${id}.Test${id} BackupAndGetData + showTest M + } error]} then { + if {[expectedError $error]} then { + showTest m + } else { + failTest $error + } + } } else { set id [object invoke Interpreter.GetActive NextId] set code [compileCSharpWith [subst { using System; using System.Data.SQLite; @@ -531,16 +557,24 @@ } } }] true true true results errors System.Data.SQLite.dll] if {$code eq "Ok"} then { set ::compiled(13) $id; # NOTE: Compiled OK. - object invoke _Dynamic${id}.Test${id} BackupAndGetData + if {[catch { + object invoke _Dynamic${id}.Test${id} BackupAndGetData + showTest M + } error]} then { + if {[expectedError $error]} then { + showTest m + } else { + failTest $error + } + } } else { error $errors } } - showTest D } }] 0] }] ############################################################################# @@ -554,18 +588,18 @@ if {[catch { for {set index 1} {$index <= $count} {incr index} { set result [sql execute -execute scalar $db \ "PRAGMA integrity_check;"] if {$result eq "ok"} then { - showTest E + showTest N } else { error [appendArgs "integrity check failed: " $result] } } } error]} then { if {[expectedError $error]} then { - showTest * + showTest n } else { failTest $error } } cleanupDb $dstFileName db false true false @@ -580,15 +614,15 @@ # lappend ::times(15) [lindex [time { if {[catch { for {set index 1} {$index <= $count} {incr index} { collectGarbage $::test_channel - showTest F + showTest O } } error]} then { if {[expectedError $error]} then { - showTest * + showTest o } else { failTest $error } } }] 0]