diff options
Diffstat (limited to 'tests/canvWind.test')
-rw-r--r-- | tests/canvWind.test | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/tests/canvWind.test b/tests/canvWind.test index 9844ff0..436ee2c 100644 --- a/tests/canvWind.test +++ b/tests/canvWind.test @@ -6,12 +6,14 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 +namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands -test canvWind-1.1 {DisplayWinItem, windows off-screen vertically} { - catch {destroy .t} +test canvWind-1.1 {DisplayWinItem, windows off-screen vertically} -setup { + destroy .t +} -body { toplevel .t canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -bd 2 \ -relief sunken -xscrollincrement 1 -yscrollincrement 1 \ @@ -37,9 +39,13 @@ test canvWind-1.1 {DisplayWinItem, windows off-screen vertically} { .t.c yview scroll -1 units update lappend x [list [winfo ismapped $f] [winfo y $f]] -} {{1 23} {1 -29} {0 -29} {1 225} {0 225}} -test canvWind-1.2 {DisplayWinItem, windows off-screen vertically} { - catch {destroy .t} +} -cleanup { + destroy .t +} -result {{1 23} {1 -29} {0 -29} {1 225} {0 225}} + +test canvWind-1.2 {DisplayWinItem, windows off-screen vertically} -setup { + destroy .t +} -body { toplevel .t canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -bd 2 \ -relief sunken -xscrollincrement 1 -yscrollincrement 1 \ @@ -65,9 +71,13 @@ test canvWind-1.2 {DisplayWinItem, windows off-screen vertically} { .t.c yview scroll -1 units update lappend x [list [winfo ismapped $f] [winfo y $f]] -} {{1 3} {1 -49} {0 -49} {1 205} {0 205}} -test canvWind-1.3 {DisplayWinItem, windows off-screen horizontally} { - catch {destroy .t} +} -cleanup { + destroy .t +} -result {{1 3} {1 -49} {0 -49} {1 205} {0 205}} + +test canvWind-1.3 {DisplayWinItem, windows off-screen horizontally} -setup { + destroy .t +} -body { toplevel .t canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -bd 2 \ -relief sunken -xscrollincrement 1 -yscrollincrement 1 \ @@ -93,9 +103,13 @@ test canvWind-1.3 {DisplayWinItem, windows off-screen horizontally} { .t.c xview scroll -1 units update lappend x [list [winfo ismapped $f] [winfo x $f]] -} {{1 23} {1 -59} {0 -59} {1 275} {0 275}} -test canvWind-1.4 {DisplayWinItem, windows off-screen horizontally} { - catch {destroy .t} +} -cleanup { + destroy .t +} -result {{1 23} {1 -59} {0 -59} {1 275} {0 275}} + +test canvWind-1.4 {DisplayWinItem, windows off-screen horizontally} -setup { + destroy .t +} -body { toplevel .t canvas .t.c -scrollregion {0 0 1000 800} -width 250 -height 200 -bd 2 \ -relief sunken -xscrollincrement 1 -yscrollincrement 1 \ @@ -121,8 +135,9 @@ test canvWind-1.4 {DisplayWinItem, windows off-screen horizontally} { .t.c xview scroll -1 units update lappend x [list [winfo ismapped $f] [winfo x $f]] -} {{1 3} {1 -79} {0 -79} {1 255} {0 255}} -catch {destroy .t} +} -cleanup { + destroy .t +} -result {{1 3} {1 -79} {0 -79} {1 255} {0 255}} # cleanup cleanupTests |