Files
TheRock/rocm-systems/projects/rocprofiler-sdk/external/sqlite/ext/session/sessionchange.test
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

102 lines
2.2 KiB
Plaintext

# 2011 March 07
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
if {![info exists testdir]} {
set testdir [file join [file dirname [info script]] .. .. test]
}
source [file join [file dirname [info script]] session_common.tcl]
source $testdir/tester.tcl
ifcapable !session {finish_test; return}
set testprefix sessionchange
do_execsql_test 1.0 {
CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c);
}
do_test 1.1 {
set C [changeset_from_sql {
INSERT INTO t1 VALUES(1, 2, 3);
INSERT INTO t1 VALUES(10, 20, 30);
}]
set res [list]
set iter [sqlite3changeset_start $C]
while {[$iter next]=="SQLITE_ROW"} {
lappend res [$iter data]
}
$iter finalize
set res
} [list \
{INSERT t1 0 X.. {} {i 10 i 20 i 30}} \
{INSERT t1 0 X.. {} {i 1 i 2 i 3}} \
]
do_test 1.2 {
sqlite3changegroup grp
set iter [sqlite3changeset_start $C]
while {[$iter next]=="SQLITE_ROW"} {
grp add_change $iter
}
$iter finalize
set res [list]
grp output
sqlite3session_foreach c [grp output] { lappend res $c }
grp delete
set res
} [list \
{INSERT t1 0 X.. {} {i 10 i 20 i 30}} \
{INSERT t1 0 X.. {} {i 1 i 2 i 3}} \
]
do_test 1.3.1 {
set iter [sqlite3changeset_start $C]
sqlite3changegroup grp
list [catch { grp add_change $iter } msg] $msg
} {1 SQLITE_ERROR}
do_test 1.3.2 {
while {[$iter next]=="SQLITE_ROW"} { }
list [catch { grp add_change $iter } msg] $msg
} {1 SQLITE_ERROR}
grp delete
$iter finalize
do_test 1.4 {
set res [list]
set iter [sqlite3changeset_start -invert $C]
while {[$iter next]=="SQLITE_ROW"} {
lappend res [$iter data]
}
$iter finalize
set res
} [list \
{DELETE t1 0 X.. {i 10 i 20 i 30} {}} \
{DELETE t1 0 X.. {i 1 i 2 i 3} {}} \
]
do_test 1.5 {
sqlite3changegroup grp
set iter [sqlite3changeset_start -invert $C]
$iter next
list [catch { grp add_change $iter } msg] $msg
} {1 SQLITE_ERROR}
$iter finalize
grp delete
finish_test