System.Data.SQLite
Check-in [e2dffd3a80]
Not logged in

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

Overview
Comment:Enhancements to tests added by the previous check-in.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e2dffd3a8032b3849698c60c4512e3be916ec8ed
User & Date: mistachkin 2018-02-26 19:31:01
Context
2018-02-26
20:23
The SetConfigurationOption method needs to throw an exception when the core library result code indicates an error. check-in: ca6b82074a user: mistachkin tags: trunk
19:31
Enhancements to tests added by the previous check-in. check-in: e2dffd3a80 user: mistachkin tags: trunk
19:17
Add tests for the database option values added via check-in [b7ba6996c1]. check-in: b3872ff42e user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/basic.eagle.

4976
4977
4978
4979
4980
4981
4982








4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994



4995
4996
4997
4998
4999
5000
5001
....
5002
5003
5004
5005
5006
5007
5008
5009

5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
        set value [object invoke -create System.Boolean Parse true]
      }
    }

    lappend result [$connection SetConfigurationOption $dbConfig $value]
  }









  sql execute $db {
    CREATE TABLE t1(x);
    INSERT INTO t1 (x) VALUES(RANDOMBLOB(1024));
  }

  set current 0; set highwater 0

  lappend result [$connection -flags +NonPublic \
      _sql.GetStatusParameter SQLITE_DBSTATUS_LOOKASIDE_USED \
      false current highwater]

  lappend result $current $highwater



} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  if {[info exists ptr]} then {
    object invoke -flags +NonPublic \
................................................................................
        System.Data.SQLite.SQLiteMemory Free $ptr
  }

  unset -nocomplain current highwater ints ptr value
  unset -nocomplain result dbConfig dbConfigs
  unset -nocomplain connection db fileName
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -result {{} {} {} {} {} {} {} {} {} {} Ok 48 100}}


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

reportSQLiteResources $test_channel

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

runSQLiteTestFilesEpilogue
runSQLiteTestEpilogue
runTestEpilogue







>
>
>
>
>
>
>
>





|



|

|
>
>
>







 







|
>










4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
....
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
        set value [object invoke -create System.Boolean Parse true]
      }
    }

    lappend result [$connection SetConfigurationOption $dbConfig $value]
  }

  set current(0) 0; set highwater(0) 0

  lappend result [$connection -flags +NonPublic \
      _sql.GetStatusParameter SQLITE_DBSTATUS_LOOKASIDE_USED \
      false current(0) highwater(0)]

  lappend result $current(0) $highwater(0)

  sql execute $db {
    CREATE TABLE t1(x);
    INSERT INTO t1 (x) VALUES(RANDOMBLOB(1024));
  }

  set current(1) 0; set highwater(1) 0

  lappend result [$connection -flags +NonPublic \
      _sql.GetStatusParameter SQLITE_DBSTATUS_LOOKASIDE_USED \
      false current(1) highwater(1)]

  lappend result $current(1) $highwater(1)

  lappend result [expr {$current(1) == $current(0)}]
  lappend result [expr {$highwater(1) > $highwater(0)}]
} -cleanup {
  cleanupDb $fileName

  freeDbConnection

  if {[info exists ptr]} then {
    object invoke -flags +NonPublic \
................................................................................
        System.Data.SQLite.SQLiteMemory Free $ptr
  }

  unset -nocomplain current highwater ints ptr value
  unset -nocomplain result dbConfig dbConfigs
  unset -nocomplain connection db fileName
} -constraints {eagle monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite} -match regexp -result {^\{\} \{\} \{\} \{\} \{\} \{\} \{\}\
\{\} \{\} \{\} Ok \d+ \d+ Ok \d+ \d+ True True$}}

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

reportSQLiteResources $test_channel

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

runSQLiteTestFilesEpilogue
runSQLiteTestEpilogue
runTestEpilogue