System.Data.SQLite
Check-in [42c443e72c]
Not logged in

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

Overview
Comment:Add tests for the static SQLiteConnection.ReleaseMemory method.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | win32heap
Files: files | file ages | folders
SHA1: 42c443e72caa4ef18e7a210d00692d24454f7011
User & Date: mistachkin 2013-11-11 00:57:16
Context
2013-11-11
02:18
Update SQLite core library to the latest trunk code. Refer to the Win32-specific core library functions only when it is likely they will be available. check-in: 76131c4fc9 user: mistachkin tags: win32heap
00:57
Add tests for the static SQLiteConnection.ReleaseMemory method. check-in: 42c443e72c user: mistachkin tags: win32heap
2013-11-09
23:41
Merge test constraint fix from trunk. check-in: f642814971 user: mistachkin tags: win32heap
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/basic.eagle.

  2611   2611     cleanupDb $fileName
  2612   2612   
  2613   2613     unset -nocomplain db fileName
  2614   2614   } -constraints \
  2615   2615   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite} -result \
  2616   2616   {0 1 1 {unmatched '('} 0 1 1 {unmatched '('} 0 0 1 {unmatched '('} 0 0 1\
  2617   2617   {unmatched '('}}}
         2618  +
         2619  +###############################################################################
         2620  +
         2621  +reportSQLiteResources $test_channel
         2622  +
         2623  +###############################################################################
         2624  +
         2625  +runTest {test data-1.54 {SQLiteConnection.ReleaseMemory method} -setup {
         2626  +  setupDb [set fileName data-1.54.db]
         2627  +} -body {
         2628  +  set result [list]
         2629  +
         2630  +  set nFree 0; set resetOk false; set nLargest 0
         2631  +  set code [object invoke \
         2632  +      System.Data.SQLite.SQLiteConnection ReleaseMemory \
         2633  +      -1 true true nFree resetOk nLargest]
         2634  +
         2635  +  lappend result [list $code $nFree $resetOk $nLargest]
         2636  +
         2637  +  sql execute $db "CREATE TABLE t1(x);"
         2638  +  sql execute $db "INSERT INTO t1 (x) VALUES(RANDOMBLOB(1048576));"
         2639  +
         2640  +  set nFree 0; set resetOk false; set nLargest 0
         2641  +  set code [object invoke \
         2642  +      System.Data.SQLite.SQLiteConnection ReleaseMemory \
         2643  +      -1 true true nFree resetOk nLargest]
         2644  +
         2645  +  tputs $test_channel [appendArgs \
         2646  +      "---- memory released by SQLite... " $nFree " bytes\n"]
         2647  +
         2648  +  lappend result [list $code $nFree $resetOk $nLargest]
         2649  +
         2650  +  cleanupDb $fileName
         2651  +  checkForSQLiteDirectories $test_channel true
         2652  +
         2653  +  set nFree 0; set resetOk false; set nLargest 0
         2654  +  set code [object invoke \
         2655  +      System.Data.SQLite.SQLiteConnection ReleaseMemory \
         2656  +      -1 true true nFree resetOk nLargest]
         2657  +
         2658  +  tputs $test_channel [appendArgs \
         2659  +      "---- largest free SQLite heap block... " $nLargest " bytes\n"]
         2660  +
         2661  +  lappend result [list $code $nFree $resetOk $nLargest]
         2662  +} -cleanup {
         2663  +  cleanupDb $fileName
         2664  +
         2665  +  unset -nocomplain nLargest resetOk nFree code result db fileName
         2666  +} -constraints {eagle monoBug28 configuration.Release command.sql compile.DATA\
         2667  +SQLite System.Data.SQLite} -match regexp -result {^\{Busy 0 False 0\} \{Busy\
         2668  +\d+ False 0\} \{Ok 0 True \d+\}$}}
         2669  +
         2670  +###############################################################################
         2671  +
         2672  +reportSQLiteResources $test_channel
  2618   2673   
  2619   2674   ###############################################################################
  2620   2675   
  2621   2676   unset -nocomplain systemDataSQLiteDllFile systemDataSQLiteLinqDllFile \
  2622   2677       testExeFile testLinqExeFile northwindEfDbFile testLinqOutFile
  2623   2678   
  2624   2679   ###############################################################################
  2625   2680   
  2626   2681   runSQLiteTestEpilogue
  2627   2682   runTestEpilogue