Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | More work on tests. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sessions |
Files: | files | file ages | folders |
SHA1: |
e9782935e2f7877652af95a1697d580c |
User & Date: | mistachkin 2017-10-11 00:32:02.909 |
Context
2017-10-11
| ||
03:29 | Make sure that null is passed to the native sqlite3session_table_filter() API when the callback is null. Also, fix type signature of the session extension xFilter native delegate. check-in: f8d3d92453 user: mistachkin tags: sessions | |
00:32 | More work on tests. check-in: e9782935e2 user: mistachkin tags: sessions | |
2017-10-10
| ||
23:02 | Move the rawData parameter checking code into its own (static) method. check-in: 0adbed8ca0 user: mistachkin tags: sessions | |
Changes
Changes to Tests/session.eagle.
︙ | ︙ | |||
221 222 223 224 225 226 227 | set connection [getDbConnection] set session [$connection -alias CreateSession main] $session AttachTable null makeSomeChanges $db [list insert update delete] true | | | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | set connection [getDbConnection] set session [$connection -alias CreateSession main] $session AttachTable null makeSomeChanges $db [list insert update delete] true unset -nocomplain byteArray; set byteArray null $session -alias CreateChangeSet byteArray set rawData [createByteArray [arrayToList byteArray]] object removeref $rawData set stream(1) [object create -alias \ System.IO.FileStream $fileName(1) Create Write] |
︙ | ︙ | |||
277 278 279 280 281 282 283 | set connection [getDbConnection] set session [$connection -alias CreateSession main] $session AttachTable null makeSomeChanges $db [list insert update delete] false | | | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | set connection [getDbConnection] set session [$connection -alias CreateSession main] $session AttachTable null makeSomeChanges $db [list insert update delete] false unset -nocomplain byteArray; set byteArray null $session -alias CreateChangeSet byteArray set rawData [createByteArray [arrayToList byteArray]] object removeref $rawData set changeSet(1) [$connection -alias CreateChangeSet $rawData] changeSetToString $changeSet(1) true |
︙ | ︙ | |||
326 327 328 329 330 331 332 | runTest {test session-1.3 {session enabled/disabled state} -setup { setupDb [set fileName session-1.3.db] cleanupSomeText } -body { createTheSchema $db | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | > | < < | | | > | | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | runTest {test session-1.3 {session enabled/disabled state} -setup { setupDb [set fileName session-1.3.db] cleanupSomeText } -body { createTheSchema $db makeSomeChanges $db [list insert] false set connection [getDbConnection] set session [$connection -alias CreateSession main] lappend result IsEnabled [$session IsEnabled] $session AttachTable null lappend result IsEnabled [$session IsEnabled] $session SetToDisabled lappend result IsEnabled [$session IsEnabled] makeSomeChanges $db [list insert] false lappend result IsEmpty [$session IsEmpty] unset -nocomplain byteArray; set byteArray null $session -alias CreateChangeSet byteArray set rawData [createByteArray [arrayToList byteArray]] object removeref $rawData lappend result Length [$rawData Length] $session SetToEnabled lappend result IsEnabled [$session IsEnabled] makeSomeChanges $db [list insert] false lappend result IsEmpty [$session IsEmpty] unset -nocomplain byteArray; set byteArray null $session -alias CreateChangeSet byteArray set rawData [createByteArray [arrayToList byteArray]] object removeref $rawData set changeSet(1) [$connection -alias CreateChangeSet $rawData] lappend result [changeSetToString $changeSet(1) false] } -cleanup { cleanupSomeText unset -nocomplain oldValue newValue conflictValue unset -nocomplain result changeSet rawData byteArray session freeDbConnection unset -nocomplain connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop\ defineConstant.System.Data.SQLite.INTEROP_SESSION_EXTENSION} -result {IsEnabled\ True IsEnabled True IsEnabled False IsEmpty True Length 0 IsEnabled True\ IsEmpty False {TableName t1 NumberOfColumns 2 OperationCode Insert Indirect\ False PrimaryKeyColumns {[True, False]}}}} ############################################################################### runTest {test session-1.4 {session direct/indirect state} -setup { setupDb [set fileName session-1.4.db] cleanupSomeText } -body { createTheSchema $db makeSomeChanges $db [list insert] false set connection [getDbConnection] set session [$connection -alias CreateSession main] lappend result IsIndirect [$session IsIndirect] $session AttachTable null lappend result IsIndirect [$session IsIndirect] $session SetToIndirect lappend result IsIndirect [$session IsIndirect] makeSomeChanges $db [list insert] false lappend result IsEmpty [$session IsEmpty] unset -nocomplain byteArray; set byteArray null $session -alias CreateChangeSet byteArray set rawData [createByteArray [arrayToList byteArray]] object removeref $rawData $session SetToDirect lappend result IsIndirect [$session IsIndirect] makeSomeChanges $db [list insert] false lappend result IsEmpty [$session IsEmpty] unset -nocomplain byteArray; set byteArray null $session -alias CreateChangeSet byteArray set rawData [createByteArray [arrayToList byteArray]] object removeref $rawData set changeSet(1) [$connection -alias CreateChangeSet $rawData] lappend result [changeSetToString $changeSet(1) false] } -cleanup { |
︙ | ︙ | |||
375 376 377 378 379 380 381 | unset -nocomplain connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop\ | | > | | < < < | | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | unset -nocomplain connection cleanupDb $fileName unset -nocomplain db fileName } -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\ System.Data.SQLite SQLiteInterop\ defineConstant.System.Data.SQLite.INTEROP_SESSION_EXTENSION} -result \ {IsIndirect False IsIndirect False IsIndirect True IsEmpty False IsIndirect\ False IsEmpty False {TableName t1 NumberOfColumns 2 OperationCode Insert\ Indirect True PrimaryKeyColumns {[True, False]} TableName t1 NumberOfColumns 2\ OperationCode Insert Indirect False PrimaryKeyColumns {[True, False]}}}} ############################################################################### rename createByteArray "" rename arrayToList "" rename getChangeSetFileName "" rename makeSomeChanges "" |
︙ | ︙ |