summaryrefslogtreecommitdiffstats
path: root/tests/canvWind.test
diff options
context:
space:
mode:
authoraniap <aniap>2008-08-18 16:09:10 (GMT)
committeraniap <aniap>2008-08-18 16:09:10 (GMT)
commitdd56eaf2d1e9fe87d131b70cb539bc868f792cf7 (patch)
treeed841c592c161190f01ff5536cc3ea0d9e39a441 /tests/canvWind.test
parent1cdabdfeb535511baa7e1d8f4f9eafec265b4eed (diff)
downloadtk-dd56eaf2d1e9fe87d131b70cb539bc868f792cf7.zip
tk-dd56eaf2d1e9fe87d131b70cb539bc868f792cf7.tar.gz
tk-dd56eaf2d1e9fe87d131b70cb539bc868f792cf7.tar.bz2
Update to tcltest2
Diffstat (limited to 'tests/canvWind.test')
-rw-r--r--tests/canvWind.test45
1 files changed, 30 insertions, 15 deletions
diff --git a/tests/canvWind.test b/tests/canvWind.test
index 1b07e3f..5115f34 100644
--- a/tests/canvWind.test
+++ b/tests/canvWind.test
@@ -6,14 +6,16 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: canvWind.test,v 1.6 2004/05/23 17:34:48 dkf Exp $
+# RCS: @(#) $Id: canvWind.test,v 1.7 2008/08/18 16:09:10 aniap Exp $
-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 \
@@ -39,9 +41,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 \
@@ -67,9 +73,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 \
@@ -95,9 +105,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 \
@@ -123,8 +137,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