System.Data.SQLite
Check-in [984343ce67]
Not logged in

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

Overview
Comment:Revise and enhance tests for [58ed318f2f].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 984343ce673f3a6d81f0fe28a5fe718f567a77de
User & Date: mistachkin 2014-08-12 19:40:24
Context
2014-08-14
04:22
Correct several tests. check-in: b85106c760 user: mistachkin tags: trunk
2014-08-12
19:40
Revise and enhance tests for [58ed318f2f]. check-in: 984343ce67 user: mistachkin tags: trunk
19:19
Add NoConvertSettings connection flag to disable querying of runtime configuration settings from within the SQLiteConvert class. Pursuant to [58ed318f2f]. check-in: 59d43c48bb user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/tkt-58ed318f2f.eagle.

    52     52       CREATE TABLE t1(x, y);
    53     53       INSERT INTO t1 (x, y) VALUES(0, 1);
    54     54       INSERT INTO t1 (x, y) VALUES('0', '1');
    55     55     }
    56     56   
    57     57     sql execute -execute reader -format list $db "SELECT x, y FROM t1;"
    58     58   
    59         -  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == 2 && \
    60         -      [getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
           59  +  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == 2}
    61     60   } -cleanup {
    62     61     cleanupDb $fileName
    63     62   
    64     63     unset -nocomplain db fileName
    65     64   } -constraints \
    66     65   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
    67     66   buildConfiguration.Debug} -result {True}}
................................................................................
    79     78       CREATE TABLE t1(x, y);
    80     79       INSERT INTO t1 (x, y) VALUES(0, 1);
    81     80       INSERT INTO t1 (x, y) VALUES('0', '1');
    82     81     }
    83     82   
    84     83     sql execute -execute reader -format list $db "SELECT x, y FROM t1;"
    85     84   
    86         -  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == 2 && \
    87         -      [getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
           85  +  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == 2}
    88     86   } -cleanup {
    89     87     cleanupDb $fileName
    90     88   
    91     89     unset -nocomplain db fileName
    92     90   } -constraints \
    93     91   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
    94     92   buildConfiguration.Debug} -result {True}}
................................................................................
   107    105       CREATE TABLE t1(x, y);
   108    106       INSERT INTO t1 (x, y) VALUES(0, 1);
   109    107       INSERT INTO t1 (x, y) VALUES('0', '1');
   110    108     }
   111    109   
   112    110     sql execute -execute reader -format list $db "SELECT x, y FROM t1;"
   113    111   
   114         -  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == -1 && \
   115         -      [getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
          112  +  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == -1}
   116    113   } -cleanup {
   117    114     cleanupDb $fileName
   118    115   
   119    116     unset -nocomplain db fileName
   120    117   } -constraints \
   121    118   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
   122    119   buildConfiguration.Debug} -result {True}}
................................................................................
   135    132       CREATE TABLE t1(x, y);
   136    133       INSERT INTO t1 (x, y) VALUES(0, 1);
   137    134       INSERT INTO t1 (x, y) VALUES('0', '1');
   138    135     }
   139    136   
   140    137     sql execute -execute reader -format list $db "SELECT x, y FROM t1;"
   141    138   
   142         -  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == -1 && \
   143         -      [getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
          139  +  expr {[getSettingReadCount Use_SQLiteConvert_DefaultDbType] == -1}
   144    140   } -cleanup {
   145    141     cleanupDb $fileName
   146    142   
   147    143     unset -nocomplain db fileName
   148    144   } -constraints \
   149    145   {eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
   150    146   buildConfiguration.Debug} -result {True}}
................................................................................
   151    147   
   152    148   ###############################################################################
   153    149   
   154    150   reportSQLiteResources $test_channel true
   155    151   
   156    152   ###############################################################################
   157    153   
   158         -runTest {test tkt-58ed318f2f-1.5 {zero DefaultDbType settings read} -setup {
   159         -  setupDb [set fileName tkt-58ed318f2f-1.5.db] "" "" "" NoConvertSettings
          154  +runTest {test tkt-58ed318f2f-1.5 {standard GetDefaultTypeName usage} -setup {
          155  +  setupDb [set fileName tkt-58ed318f2f-1.5.db]
          156  +} -body {
          157  +  set connection [getDbConnection]
          158  +
          159  +  sql execute $db {
          160  +    CREATE TABLE t1(x, y);
          161  +    INSERT INTO t1 (x, y) VALUES(0, 1);
          162  +    INSERT INTO t1 (x, y) VALUES('0', '1');
          163  +  }
          164  +
          165  +  set columns [$connection GetSchema COLUMNS]
          166  +
          167  +  expr {[getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == 2}
          168  +} -cleanup {
          169  +  cleanupDb $fileName
          170  +
          171  +  freeDbConnection
          172  +
          173  +  unset -nocomplain columns connection db fileName
          174  +} -constraints \
          175  +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
          176  +buildConfiguration.Debug} -result {True}}
          177  +
          178  +###############################################################################
          179  +
          180  +reportSQLiteResources $test_channel true
          181  +
          182  +###############################################################################
          183  +
          184  +runTest {test tkt-58ed318f2f-1.6 {no property GetDefaultTypeName usage} -setup {
          185  +  setupDb [set fileName tkt-58ed318f2f-1.6.db] "" "" "" UseConnectionTypes
          186  +} -body {
          187  +  set connection [getDbConnection]
          188  +
          189  +  sql execute $db {
          190  +    CREATE TABLE t1(x, y);
          191  +    INSERT INTO t1 (x, y) VALUES(0, 1);
          192  +    INSERT INTO t1 (x, y) VALUES('0', '1');
          193  +  }
          194  +
          195  +  set columns [$connection GetSchema COLUMNS]
          196  +
          197  +  expr {[getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == 2}
          198  +} -cleanup {
          199  +  cleanupDb $fileName
          200  +
          201  +  freeDbConnection
          202  +
          203  +  unset -nocomplain columns connection db fileName
          204  +} -constraints \
          205  +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
          206  +buildConfiguration.Debug} -result {True}}
          207  +
          208  +###############################################################################
          209  +
          210  +reportSQLiteResources $test_channel true
          211  +
          212  +###############################################################################
          213  +
          214  +runTest {test tkt-58ed318f2f-1.7 {no flag GetDefaultTypeName usage} -setup {
          215  +  setupDb [set fileName tkt-58ed318f2f-1.7.db] "" "" "" "" \
          216  +      "DefaultDbType=String;"
          217  +} -body {
          218  +  set connection [getDbConnection]
          219  +
          220  +  sql execute $db {
          221  +    CREATE TABLE t1(x, y);
          222  +    INSERT INTO t1 (x, y) VALUES(0, 1);
          223  +    INSERT INTO t1 (x, y) VALUES('0', '1');
          224  +  }
          225  +
          226  +  set columns [$connection GetSchema COLUMNS]
          227  +
          228  +  expr {[getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
          229  +} -cleanup {
          230  +  cleanupDb $fileName
          231  +
          232  +  freeDbConnection
          233  +
          234  +  unset -nocomplain columns connection db fileName
          235  +} -constraints \
          236  +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
          237  +buildConfiguration.Debug} -result {True}}
          238  +
          239  +###############################################################################
          240  +
          241  +reportSQLiteResources $test_channel true
          242  +
          243  +###############################################################################
          244  +
          245  +runTest {test tkt-58ed318f2f-1.8 {zero GetDefaultTypeName usage} -setup {
          246  +  setupDb [set fileName tkt-58ed318f2f-1.8.db] "" "" "" UseConnectionTypes \
          247  +      "DefaultTypeName=TEXT;"
          248  +} -body {
          249  +  set connection [getDbConnection]
          250  +
          251  +  sql execute $db {
          252  +    CREATE TABLE t1(x, y);
          253  +    INSERT INTO t1 (x, y) VALUES(0, 1);
          254  +    INSERT INTO t1 (x, y) VALUES('0', '1');
          255  +  }
          256  +
          257  +  set columns [$connection GetSchema COLUMNS]
          258  +
          259  +  expr {[getSettingReadCount Use_SQLiteConvert_DefaultTypeName] == -1}
          260  +} -cleanup {
          261  +  cleanupDb $fileName
          262  +
          263  +  freeDbConnection
          264  +
          265  +  unset -nocomplain columns connection db fileName
          266  +} -constraints \
          267  +{eagle monoBug28 command.sql compile.DATA SQLite System.Data.SQLite\
          268  +buildConfiguration.Debug} -result {True}}
          269  +
          270  +###############################################################################
          271  +
          272  +reportSQLiteResources $test_channel true
          273  +
          274  +###############################################################################
          275  +
          276  +runTest {test tkt-58ed318f2f-1.9 {zero DefaultDbType settings read} -setup {
          277  +  setupDb [set fileName tkt-58ed318f2f-1.9.db] "" "" "" NoConvertSettings
   160    278   } -body {
   161    279     sql execute $db {
   162    280       CREATE TABLE t1(x, y);
   163    281       INSERT INTO t1 (x, y) VALUES(0, 1);
   164    282       INSERT INTO t1 (x, y) VALUES('0', '1');
   165    283     }
   166    284   
................................................................................
   177    295   
   178    296   ###############################################################################
   179    297   
   180    298   reportSQLiteResources $test_channel true
   181    299   
   182    300   ###############################################################################
   183    301   
   184         -runTest {test tkt-58ed318f2f-1.6 {zero DefaultTypeName settings read} -setup {
   185         -  setupDb [set fileName tkt-58ed318f2f-1.6.db] "" "" "" NoConvertSettings
          302  +runTest {test tkt-58ed318f2f-1.10 {zero DefaultTypeName settings read} -setup {
          303  +  setupDb [set fileName tkt-58ed318f2f-1.10.db] "" "" "" NoConvertSettings
   186    304   } -body {
   187    305     set connection [getDbConnection]
   188    306   
   189    307     sql execute $db {
   190    308       CREATE TABLE t1(x, y);
   191    309       INSERT INTO t1 (x, y) VALUES(0, 1);
   192    310       INSERT INTO t1 (x, y) VALUES('0', '1');
................................................................................
   207    325   
   208    326   ###############################################################################
   209    327   
   210    328   reportSQLiteResources $test_channel true
   211    329   
   212    330   ###############################################################################
   213    331   
   214         -runTest {test tkt-58ed318f2f-1.7 {normal SQLiteConvert settings usage} -setup {
   215         -  setupDb [set fileName tkt-58ed318f2f-1.7.db]
          332  +runTest {test tkt-58ed318f2f-1.11 {normal SQLiteConvert settings usage} -setup {
          333  +  setupDb [set fileName tkt-58ed318f2f-1.11.db]
   216    334   } -body {
   217    335     set connection [getDbConnection]
   218    336   
   219    337     sql execute $db {
   220    338       CREATE TABLE t1(x, y);
   221    339       INSERT INTO t1 (x, y) VALUES(0, 1);
   222    340       INSERT INTO t1 (x, y) VALUES('0', '1');
................................................................................
   242    360   
   243    361   ###############################################################################
   244    362   
   245    363   reportSQLiteResources $test_channel true
   246    364   
   247    365   ###############################################################################
   248    366   
   249         -runTest {test tkt-58ed318f2f-1.8 {zero SQLiteConvert settings usage} -setup {
   250         -  setupDb [set fileName tkt-58ed318f2f-1.8.db] "" "" "" NoConvertSettings
          367  +runTest {test tkt-58ed318f2f-1.12 {zero SQLiteConvert settings usage} -setup {
          368  +  setupDb [set fileName tkt-58ed318f2f-1.12.db] "" "" "" NoConvertSettings
   251    369   } -body {
   252    370     set connection [getDbConnection]
   253    371   
   254    372     sql execute $db {
   255    373       CREATE TABLE t1(x, y);
   256    374       INSERT INTO t1 (x, y) VALUES(0, 1);
   257    375       INSERT INTO t1 (x, y) VALUES('0', '1');