diff options
author | georgeps <georgeps> | 2008-08-19 17:21:48 (GMT) |
---|---|---|
committer | georgeps <georgeps> | 2008-08-19 17:21:48 (GMT) |
commit | 3581ffacd6eb19154a9a1cc831cb86954b16f5bf (patch) | |
tree | 9bd148aa9dcbbf66479f399875f3bb8d18f3b11a | |
parent | 9f59ca1a1428d923b1fe05bd7f35ca4928f45a3a (diff) | |
download | tk-3581ffacd6eb19154a9a1cc831cb86954b16f5bf.zip tk-3581ffacd6eb19154a9a1cc831cb86954b16f5bf.tar.gz tk-3581ffacd6eb19154a9a1cc831cb86954b16f5bf.tar.bz2 |
Remove id.test that is no longer needed, because of the XID cleanup.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | tests/id.test | 97 |
2 files changed, 2 insertions, 97 deletions
@@ -31,6 +31,8 @@ win/tkWinPort.h: Remove TkFreeWindowId and TkInitXId. win/tkWinWindow.c: Remove TkpWindowWasRecentlyDeleted. + tests/id.test: Remove this unnecessary test. + 2008-08-19 Joe English <jenglish@users.sourceforge.net> * generic/ttk/ttkScroll.c: Don't use sprintf "%g" to diff --git a/tests/id.test b/tests/id.test deleted file mode 100644 index 1ffa93a..0000000 --- a/tests/id.test +++ /dev/null @@ -1,97 +0,0 @@ -# This file is a Tcl script to test out the procedures in the file -# tkId.c, which recycle X resource identifiers. It is organized in -# the standard fashion for Tcl tests. -# -# Copyright (c) 1995 Sun Microsystems, Inc. -# Copyright (c) 1998-1999 by Scriptics Corporation. -# All rights reserved. -# -# RCS: @(#) $Id: id.test,v 1.10 2008/08/13 23:58:01 aniap Exp $ - -package require tcltest 2.2 -namespace import ::tcltest::* -eval tcltest::configure $argv -tcltest::loadTestedCommands - -test id-1.1 {WindowIdCleanup, delaying window release} -constraints { - unix testwrapper -} -body { - bind all <Destroy> {lappend x %W} - catch {unset map} - frame .f - set j 0 - foreach i {a b c d e f g h i j k l m n o p q} { - toplevel .f.$i -height 50 -width 100 - wm geometry .f.$i +$j+$j - incr j 10 - update - set map([winfo id .f.$i]) .f.$i - set map([testwrapper .f.$i]) wrapper.f.$i - } - set x {} - destroy .f - - # Destroy events should have occurred for all windows. - set result [list [lsort $x]] - - set x {} - update idletasks - set reused {} - foreach i {a b c d e} { - set w .${i}2 - frame $w -height 20 -width 100 -bd 2 -relief raised - pack $w - if [info exists map([winfo id $w])] { - lappend reused $map([winfo id $w]) - } - set map([winfo id $w]) $w - } - - # No window ids should have been reused: stale Destroy events still - # pending in queue. - lappend result [lsort $reused] - - # Wait a few seconds, then try again; ids should still not have - # been re-used. - - set y 0 - after 2000 {set y 1} - tkwait variable y - foreach i {a b c} { - set w .${i}3 - frame $w -height 20 -width 100 -bd 2 -relief raised - pack $w - if [info exists map([winfo id $w])] { - lappend reused $map([winfo id $w]) - } - set map([winfo id $w])] $w - } - - # Ids should not yet have been reused. - lappend result [lsort $reused] - - - # Wait a few more seconds, to give ids enough time to be recycled. - set y 0 - after 6000 {set y 1} - tkwait variable y - foreach i {a b c d e f} { - set w .${i}4 - frame $w -height 20 -width 100 -bd 2 -relief raised - pack $w - if [info exists map([winfo id $w])] { - lappend reused $map([winfo id $w]) - } - set map([winfo id $w])] $w - } - - # Ids should be reused now, due to time delay. Destroy events should - # have been discarded. - lappend result [lsort $reused] [lsort $x] -} -result {{.f .f.a .f.b .f.c .f.d .f.e .f.f .f.g .f.h .f.i .f.j .f.k .f.l .f.m .f.n .f.o .f.p .f.q} {} {} {.f.o .f.p .f.q wrapper.f.p wrapper.f.q} {}} - -bind all <Destroy> {} - -# cleanup -cleanupTests -return |