System.Data.SQLite

Check-in [d593d900ac]
Login

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

Overview
Comment:Add some procedures to the test suite infrastructure.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | customDataTypes
Files: files | file ages | folders
SHA1: d593d900ac364ea43a1b833f5caa4c0e15f95dda
User & Date: mistachkin 2016-06-19 08:22:04.642
Context
2016-06-19
20:17
Correction to the new test suite helper procedures. check-in: fd2ed795c1 user: mistachkin tags: customDataTypes
08:22
Add some procedures to the test suite infrastructure. check-in: d593d900ac user: mistachkin tags: customDataTypes
07:34
Fix typos in comments. check-in: 819975f2c9 user: mistachkin tags: customDataTypes
Changes
Unified Diff Show Whitespace Changes Patch
Changes to lib/System.Data.SQLite/common.eagle.
1823
1824
1825
1826
1827
1828
1829





























































1830
1831
1832
1833
1834
1835
1836
        #       System.Data.SQLite, and suitable for round-tripping with the
        #       DateTime class of the framework.  If this value is changed,
        #       various tests may fail.
        #
        return "yyyy-MM-dd HH:mm:ss.FFFFFFFK"
      }
    }






























































    proc enumerableToList { enumerable } {
      set result [list]

      if {[string length $enumerable] == 0 || $enumerable eq "null"} then {
        return $result
      }







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







1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
        #       System.Data.SQLite, and suitable for round-tripping with the
        #       DateTime class of the framework.  If this value is changed,
        #       various tests may fail.
        #
        return "yyyy-MM-dd HH:mm:ss.FFFFFFFK"
      }
    }

    proc getProperties { object varName } {
      upvar 1 $varName properties

      set count 0
      set names [object members -membertypes Property -nameonly $object]

      foreach name $names {
        if {[catch {
          object invoke -objectflags +NoDispose $object $name
        } value] == 0} then {
          if {[isObjectHandle $value]} then {
            set error null; object invoke -flags +NonPublic \
                -marshalflags +NoHandle Interpreter.GetActive \
                AddObjectReference Ok $value error

            lappend properties(objects) [list $name $value]
          } else {
            lappend properties(values) [list $name $value]
          }

          incr count
        } else {
          lappend properties(errors) [list $name $::errorCode]
        }
      }

      return $count
    }

    proc getAllProperties { object varName } {
      upvar 1 $varName properties
      set value $object

      while {true} {
        if {![info exists properties(seenObjects)] || \
            $value ni $properties(seenObjects)} then {
          getProperties $value properties
          lappend properties(seenObjects) $value
        }

        if {![info exists properties(objects)]} then {
          break
        }

        if {[llength $properties(objects)] == 0} then {
          unset properties(objects); break
        }

        set value [lindex [lindex $properties(objects) 0] end]
        set properties(objects) [lrange $properties(objects) 1 end]
      }

      if {[info exists properties(seenObjects)]} then {
        foreach value $properties(seenObjects) {
          catch {object dispose $value}
        }

        unset properties(seenObjects)
      }
    }

    proc enumerableToList { enumerable } {
      set result [list]

      if {[string length $enumerable] == 0 || $enumerable eq "null"} then {
        return $result
      }