diff options
author | jenglish@flightlab.com <jenglish> | 2007-06-09 21:45:44 (GMT) |
---|---|---|
committer | jenglish@flightlab.com <jenglish> | 2007-06-09 21:45:44 (GMT) |
commit | f481fbab1a1b573e119c02e75e2f47e722751664 (patch) | |
tree | 6ff8505955c590dbaef7689b5a4e271b4e3a3ae3 /tests | |
parent | 94ce3b2d4285f988100fc4f1084e22ec23fcb473 (diff) | |
download | tk-f481fbab1a1b573e119c02e75e2f47e722751664.zip tk-f481fbab1a1b573e119c02e75e2f47e722751664.tar.gz tk-f481fbab1a1b573e119c02e75e2f47e722751664.tar.bz2 |
Ttk_Manager API overhaul:
+ Ttk_Manager no longer responsible for managing slave records
+ Ttk_Manager structure now opaque
+ Ttk_Slave structure now private
+ Pass Ttk_Manager * to Tk_GeomMgr hooks instead of Ttk_Slave *
ttk::labelframe: Simplified -labelwidget management.
ttk::noteboook 'insert' command didn't correctly maintain current tab.
Changed documentation of ttk::panedwindow 'identify' command to
match implementation.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ttk/notebook.test | 45 | ||||
-rw-r--r-- | tests/ttk/panedwindow.test | 7 |
2 files changed, 48 insertions, 4 deletions
diff --git a/tests/ttk/notebook.test b/tests/ttk/notebook.test index ecb614a..d4c5e4c 100644 --- a/tests/ttk/notebook.test +++ b/tests/ttk/notebook.test @@ -1,5 +1,5 @@ # -# $Id: notebook.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $ +# $Id: notebook.test,v 1.2 2007/06/09 21:45:45 jenglish Exp $ # package require Tk 8.5 @@ -380,6 +380,49 @@ test notebook-7.7d "insert - current tab undisturbed" -body { .nb index current } -result 4 +test notebook-7.8a "move tabs - current tab undisturbed - exhaustive" -body { + .nb select .nb.f0 + foreach i {0 1 2 3 4} { + .nb insert $i .nb.f$i + } + + foreach i {0 1 2 3 4} { + .nb select .nb.f$i + foreach j {0 1 2 3 4} { + foreach k {0 1 2 3 4} { + .nb insert $j $k + set current [lindex [.nb tabs] [.nb index current]] + if {$current != ".nb.f$i"} { + error "($i,$j,$k) current = $current" + } + .nb insert $k $j + if {[.nb tabs] ne [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4]} { + error "swap $j $k; swap $k $j => [.nb tabs]" + } + } + } + } + .nb tabs +} -result [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4] + +test notebook-7.8b "insert new - current tab undisturbed - exhaustive" -body { + foreach i {0 1 2 3 4} { + .nb select .nb.f$i + foreach j {0 1 2 3 4} { +.nb select .nb.f$i + .nb insert $j [frame .nb.newf] + set current [lindex [.nb tabs] [.nb index current]] + if {$current != ".nb.f$i"} { + puts stderr "new tab at $j, current = $current, expect .nb.f$i" + } + destroy .nb.newf + if {[.nb tabs] ne [list .nb.f0 .nb.f1 .nb.f2 .nb.f3 .nb.f4]} { + error "tabs disturbed" + } + } + } +} + test notebook-7.end "insert - cleanup" -body { destroy .nb } diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test index 190e6b5..47764a2 100644 --- a/tests/ttk/panedwindow.test +++ b/tests/ttk/panedwindow.test @@ -1,5 +1,5 @@ # -# $Id: panedwindow.test,v 1.2 2006/11/07 03:45:28 jenglish Exp $ +# $Id: panedwindow.test,v 1.3 2007/06/09 21:45:45 jenglish Exp $ # package require Tk 8.5 @@ -156,10 +156,11 @@ test panedwindow-4.2 "forget forgotten" -body { # proc checkorder {winlist} { set pos -1 + set positions [list] foreach win $winlist { - set nextpos [winfo y $win] + lappend positions [set nextpos [winfo y $win]] if {$nextpos <= $pos} { - error "window $win out of order" + error "window $win out of order ($positions)" } set pos $nextpos } |