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

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

Overview
Comment:Finish converting the unit test infrastructure to a full-fledged Eagle package. Also, update Eagle in externals to the latest beta 18 release candidate.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b8b02007c610faa8304aad29c5a7d6b3c6bf991c
User & Date: mistachkin 2011-09-29 00:37:14
Context
2011-09-29
04:43
Allow the various binary file delete/copy/load operations to be skipped during the test prologue (for the System.Data.SQLite related binaries). check-in: d2e601c947 user: mistachkin tags: trunk
00:37
Finish converting the unit test infrastructure to a full-fledged Eagle package. Also, update Eagle in externals to the latest beta 18 release candidate. check-in: b8b02007c6 user: mistachkin tags: trunk
2011-09-28
22:48
Modify the unit test infrastructure to transform it into a formal Eagle package. check-in: b2c3d6de86 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Externals/Eagle/bin/Eagle.dll.

cannot compute difference between binary files

Changes to Externals/Eagle/bin/EagleShell.exe.

cannot compute difference between binary files

Changes to Externals/Eagle/lib/Eagle1.0/test.eagle.

704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
...
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
...
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
          tputs $channel [appendArgs "---- " $statistic " AFTER: " \
              $array($statistic,after,list) \n]
        }
      }
    }
  }
 
  proc formatList { list {columns 1} } {
    set count 1
    set result ""

    foreach item $list {
      if {[incr count -1] == 0} then {
        set count $columns
        append result \n
................................................................................
      if {[string length $item] > 0} then {
        append result $item
      } else {
        append result <noItem>
      }
    }

    return $result
  }
 
  proc formatListAsDict { list } {
    set result ""

    foreach {name value} $list {
      append result \n\t

      if {[string length $name] > 0} then {
        append result $name
................................................................................
      if {[string length $value] > 0} then {
        append result $value
      } else {
        append result <noValue>
      }
    }

    return $result
  }
 
  proc inverseLsearchGlob { noCase patterns element } {
    #
    # NOTE: Perform the inverse of [lsearch -glob], attempt
    #       to match an element against a list of patterns.
    #







|







 







|


|







 







|







704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
...
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
...
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
          tputs $channel [appendArgs "---- " $statistic " AFTER: " \
              $array($statistic,after,list) \n]
        }
      }
    }
  }
 
  proc formatList { list {default ""} {columns 1} } {
    set count 1
    set result ""

    foreach item $list {
      if {[incr count -1] == 0} then {
        set count $columns
        append result \n
................................................................................
      if {[string length $item] > 0} then {
        append result $item
      } else {
        append result <noItem>
      }
    }

    return [expr {[string length $result] > 0 ? $result : $default}]
  }
 
  proc formatListAsDict { list {default ""} } {
    set result ""

    foreach {name value} $list {
      append result \n\t

      if {[string length $name] > 0} then {
        append result $name
................................................................................
      if {[string length $value] > 0} then {
        append result $value
      } else {
        append result <noValue>
      }
    }

    return [expr {[string length $result] > 0 ? $result : $default}]
  }
 
  proc inverseLsearchGlob { noCase patterns element } {
    #
    # NOTE: Perform the inverse of [lsearch -glob], attempt
    #       to match an element against a list of patterns.
    #

Added Externals/Eagle/lib/Eagle1.0/vendor.eagle.





























































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
###############################################################################
#
# vendor.eagle --
#
# Extensible Adaptable Generalized Logic Engine (Eagle)
# Vendor Initialization File
#
# Copyright (c) 2007-2010 by Joe Mistachkin.  All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: $
#
###############################################################################

#
# STUB: This script file is a placeholder.  This file, when present, is always
#       evaluated when an interpreter is initialized.  Vendors distributing
#       Eagle can place custom application-specific, interpreter-specific
#       initialization and/or customizations in here.  Additionally, this file
#       may contain per-interpreter customizations required when porting to
#       new platforms, operating systems, etc.
#
 
#
# NOTE: Use our own namespace here because even though we do not directly
#       support namespaces ourselves, we do not want to pollute the global
#       namespace if this script actually ends up being evaluated in Tcl.
#
namespace eval ::Eagle {
  if {[isEagle]} then {
    #
    # NOTE: This script library helper procedure helps to establish the link
    #       between the System.Data.SQLite test package and Eagle.
    #
    proc addTestSuiteToAutoPath { channel quiet } {
      #
      # NOTE: Start with the directory containing this file.
      #
      set dir [file normalize [file dirname [info script]]]

      #
      # NOTE: Keep going until the directory name is empty OR is actually the
      #       root of the associated volume.
      #
      while {[string length $dir] > 0 && \
          [lsearch -exact -nocase -- [file volumes] $dir] == -1} {
        #
        # NOTE: Does this directory have the necessary sub-directory that
        #       contains a package index file?
        #
        if {[file exists [file join $dir Tests]] && \
            [file isdirectory [file join $dir Tests]] && \
            [file exists [file join $dir Tests pkgIndex.eagle]] && \
            [file isfile [file join $dir Tests pkgIndex.eagle]]} then {
          #
          # NOTE: Ok, show the directory we found.
          #
          set dir [file join $dir Tests]

          #
          # NOTE: If we have NOT been instructed to be quiet, report now.
          #
          if {!$quiet} then {
            puts -nonewline $channel [appendArgs \
                "Found vendor-specific test package directory \"" $dir \
                "\", adding...\n"]
          }

          #
          # NOTE: We found the necessary directory to add to the auto-path;
          #       However, we cannot simply add it to the auto-path directly
          #       because the auto-path is dynamically constructed after this
          #       script is evaluated; therefore, set the Eagle library path
          #       environment variable and force the appropriate internal path
          #       list to be refreshed.
          #
          lappend ::env(EAGLELIBPATH) $dir
          object invoke Utility RefreshAutoPathList

          #
          # NOTE: We are done, return success.
          #
          return true
        }

        #
        # NOTE: Keep going up the directory tree...
        #
        set dir [file dirname $dir]
      }

      #
      # NOTE: If we have NOT been instructed to be quiet, report now.
      #
      if {!$quiet} then {
        puts -nonewline $channel \
            "Could not find vendor-specific test package directory.\n"
      }

      #
      # NOTE: Directory not found, return failure.
      #
      return false
    }

    addTestSuiteToAutoPath stdout false
  }
}

Changes to Externals/Eagle/lib/Test1.0/constraints.eagle.

945
946
947
948
949
950
951















952
953
954
955
956
957
958
        addConstraint [appendArgs culture. [string map [list - _] $culture]]

        tputs $channel [appendArgs $culture \n]
      } else {
        tputs $channel [appendArgs unknown \n]
      }
    }















 
    proc checkForReferenceCountTracking { channel } {
      tputs $channel "---- checking for object reference count tracking... "

      if {[info exists ::eagle_platform(compileOptions)] && \
          ([lsearch -exact -nocase $::eagle_platform(compileOptions) \
              NOTIFY] != -1 || \







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
        addConstraint [appendArgs culture. [string map [list - _] $culture]]

        tputs $channel [appendArgs $culture \n]
      } else {
        tputs $channel [appendArgs unknown \n]
      }
    }
 
    proc checkForQuiet { channel } {
      tputs $channel "---- checking for quiet... "

      if {[object invoke Interpreter.GetActive Quiet]} then {
        #
        # NOTE: Yes, quiet mode is enabled.
        #
        addConstraint quiet

        tputs $channel yes\n
      } else {
        tputs $channel no\n
      }
    }
 
    proc checkForReferenceCountTracking { channel } {
      tputs $channel "---- checking for object reference count tracking... "

      if {[info exists ::eagle_platform(compileOptions)] && \
          ([lsearch -exact -nocase $::eagle_platform(compileOptions) \
              NOTIFY] != -1 || \

Changes to Externals/Eagle/lib/Test1.0/prologue.eagle.

449
450
451
452
453
454
455



456
457
458
459
460
461
462
...
597
598
599
600
601
602
603











604
605
606
607
608
609
610
...
908
909
910
911
912
913
914






915
916
917
918
919
920
921
....
1538
1539
1540
1541
1542
1543
1544

1545
1546
1547
1548
1549
1550
1551

  tputs $test_channel [appendArgs "---- temporary files stored in: \"" \
      [getTemporaryPath] \"\n]

  tputs $test_channel [appendArgs "---- native Tcl shell: \"" \
      $test_tclsh \"\n]




  #
  # NOTE: Initialize the Eagle test constraints.
  #
  if {[isEagle]} then {
    initializeTests

    #
................................................................................

      #
      # NOTE: Can we access the local database?
      #
      checkForDatabase $test_channel $test_database
      unset password user timeout database server
    }












    #
    # NOTE: Has object handle reference count tracking support been disabled
    #       (at compile-time)?
    #
    if {![info exists no(refCount)]} then {
      #
................................................................................
      #
      if {![info exists no(testShell)]} then {
        #
        # NOTE: For test "debug-1.3".
        #
        checkForObjectMember $test_channel Eagle._Tests.Default \
            *TestShellMainCore*






      }

      #
      # NOTE: Has IDisposable testing support been disabled?
      #
      if {![info exists no(testDisposable)]} then {
        #
................................................................................
      set timeStamp <none>
    }

    tputs $test_channel [appendArgs "---- build: " \
        [getPlatformInfo engine <none>] " " \
        [getPlatformInfo patchLevel <none>] " " \
        [getPlatformInfo tag <none>] " " \

        [getPlatformInfo text <none>] " " \
        [getPlatformInfo configuration <none>] " " \
        [getPlatformInfo suffix <none>] " " \
        $timeStamp \n]

    tputs $test_channel [appendArgs "---- os: " \
        [getPlatformInfo os <none>] \n]







>
>
>







 







>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>







 







>







449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
...
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
...
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
....
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572

  tputs $test_channel [appendArgs "---- temporary files stored in: \"" \
      [getTemporaryPath] \"\n]

  tputs $test_channel [appendArgs "---- native Tcl shell: \"" \
      $test_tclsh \"\n]

  tputs $test_channel [appendArgs "---- disabled options: " \
      [formatList [lsort [array names no]] <none>] \n]

  #
  # NOTE: Initialize the Eagle test constraints.
  #
  if {[isEagle]} then {
    initializeTests

    #
................................................................................

      #
      # NOTE: Can we access the local database?
      #
      checkForDatabase $test_channel $test_database
      unset password user timeout database server
    }

    #
    # NOTE: Has quiet testing support been disabled?
    #
    if {![info exists no(quiet)]} then {
      #
      # NOTE: For tests "basic-1.36", "debug-1.3", "debug-1.4", "object-10.*",
      #       and "perf-2.2".
      #
      checkForQuiet $test_channel
    }

    #
    # NOTE: Has object handle reference count tracking support been disabled
    #       (at compile-time)?
    #
    if {![info exists no(refCount)]} then {
      #
................................................................................
      #
      if {![info exists no(testShell)]} then {
        #
        # NOTE: For test "debug-1.3".
        #
        checkForObjectMember $test_channel Eagle._Tests.Default \
            *TestShellMainCore*

        #
        # NOTE: For tests "basic-1.36" and "debug-1.3".
        #
        checkForObjectMember $test_channel Eagle._Tests.Default \
            *TestSetQuiet*
      }

      #
      # NOTE: Has IDisposable testing support been disabled?
      #
      if {![info exists no(testDisposable)]} then {
        #
................................................................................
      set timeStamp <none>
    }

    tputs $test_channel [appendArgs "---- build: " \
        [getPlatformInfo engine <none>] " " \
        [getPlatformInfo patchLevel <none>] " " \
        [getPlatformInfo tag <none>] " " \
        [getPlatformInfo release <none>] " " \
        [getPlatformInfo text <none>] " " \
        [getPlatformInfo configuration <none>] " " \
        [getPlatformInfo suffix <none>] " " \
        $timeStamp \n]

    tputs $test_channel [appendArgs "---- os: " \
        [getPlatformInfo os <none>] \n]

Changes to Tests/basic.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.

Added Tests/pkgIndex.eagle.





























>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
###############################################################################
#
# pkgIndex.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
if {![package vsatisfies [package provide Eagle] 1.0]} {return}

package ifneeded System.Data.SQLite.Test 1.0 \
    [list source [file join $dir common.eagle]]

Changes to Tests/tkt-00f86f9739.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.

Changes to Tests/tkt-201128cc88.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

runTest {test tkt-201128cc88-1.1 {custom function with byte[] arg} -setup {
  set fileName tkt-201128cc88-1.1.db
} -body {







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-201128cc88-1.1 {custom function with byte[] arg} -setup {
  set fileName tkt-201128cc88-1.1.db
} -body {

Changes to Tests/tkt-2c630bffa7.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

set y [list -1.79769e308 -3.40282e038 -1 0 1 3.40282e038 1.79769e308]

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







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

set y [list -1.79769e308 -3.40282e038 -1 0 1 3.40282e038 1.79769e308]

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

Changes to Tests/tkt-448d663d11.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

runTest {test tkt-448d663d11-1.1 {missing journal mode, new db} -body {
  setupDb [set fileName tkt-448d663d11-1.1.db]
  sql execute -execute scalar $db "PRAGMA journal_mode;"







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-448d663d11-1.1 {missing journal mode, new db} -body {
  setupDb [set fileName tkt-448d663d11-1.1.db]
  sql execute -execute scalar $db "PRAGMA journal_mode;"

Changes to Tests/tkt-59edc1018b.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.

Changes to Tests/tkt-8b7d179c3c.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.

Changes to Tests/tkt-b4a7ddc83f.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

for {set i 1} {$i < 3} {incr i} {
  runTest {test tkt-b4a7ddc83f-1.$i {logging shutdown} -setup [subst {
    set appDomainId(1) {[object invoke AppDomain.CurrentDomain Id]}







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

for {set i 1} {$i < 3} {incr i} {
  runTest {test tkt-b4a7ddc83f-1.$i {logging shutdown} -setup [subst {
    set appDomainId(1) {[object invoke AppDomain.CurrentDomain Id]}

Changes to Tests/tkt-ccfa69fc32.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.

Changes to Tests/tkt-e1b2e0f769.eagle.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

source [file join $path common.eagle]
runSQLiteTestPrologue

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

runTest {test tkt-e1b2e0f769-1.1 {data reader cleanup} -setup {
  setupDb [set fileName tkt-e1b2e0f769-1.1.db]
} -body {







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package require EagleLibrary
package require EagleTest

runTestPrologue

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

package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-e1b2e0f769-1.1 {data reader cleanup} -setup {
  setupDb [set fileName tkt-e1b2e0f769-1.1.db]
} -body {