diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2025-05-23 02:28:37 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2025-05-23 02:28:37 (GMT) |
| commit | 25f16a070dd42bc33af26334d2071a81377aee5c (patch) | |
| tree | f20dcb1268a10aa292953f0ffa965881fefed78b /tests/ttk/treeview.test | |
| parent | e1675428ff056ed7a44fcc26a26dc5adb8e5f9eb (diff) | |
| parent | f8e4b115fdb0f0886cd853323937b8ea757fcc21 (diff) | |
| download | tk-core-tip-716.zip tk-core-tip-716.tar.gz tk-core-tip-716.tar.bz2 | |
Merge core-9-0-branchcore-tip-716
Diffstat (limited to 'tests/ttk/treeview.test')
| -rw-r--r-- | tests/ttk/treeview.test | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index 36749d7..8d70e7a 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -8,6 +8,9 @@ package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands +# Import utility procs for specific functional areas +testutils import scroll + # consistencyCheck -- # Traverse the tree to make sure the item data structures # are properly linked. @@ -18,21 +21,13 @@ loadTestedCommands proc consistencyCheck {tv {item {}}} { set i 0 foreach child [$tv children $item] { - assert {[$tv parent $child] == $item} "parent $child = $item" - assert {[$tv index $child] == $i} "index $child [$tv index $child]=$i" + assert {[$tv parent $child] eq $item} + assert {[$tv index $child] == $i} incr i consistencyCheck $tv $child } } -proc assert {expr {message ""}} { - if {![uplevel 1 [list expr $expr]]} { - set error "PANIC! PANIC! PANIC: $message ($expr failed)" - puts stderr $error - error $error - } -} - proc tvSetup {} { destroy .tv ttk::treeview .tv -columns {a b c} @@ -613,15 +608,12 @@ test treeview-8.11 "<<TreeviewSelect>> when toggling" -body { ### NEED: more tests for see/yview/scrolling -proc scrollcallback {args} { - set ::scrolldata $args -} test treeview-9.0 "scroll callback - empty tree" -body { tvSetup - .tv configure -yscrollcommand scrollcallback + .tv configure -yscrollcommand setScrollInfo .tv delete [.tv children {}] update - set ::scrolldata + set scrollInfo } -result [list 0.0 1.0] test treeview-9.1 "scrolling" -setup { @@ -1508,4 +1500,9 @@ test treeview-23.1 "cell padding" -setup { destroy .tv } -result {2 4 6 8} +# +# CLEANUP +# + +testutils forget scroll tcltest::cleanupTests |
