Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/tests/dcall.test @ 47

Last change on this file since 47 was 25, checked in by landauf, 17 years ago

added tcl to libs

File size: 1.4 KB
Line 
1# Commands covered:  none
2#
3# This file contains a collection of tests for Tcl_CallWhenDeleted.
4# Sourcing this file into Tcl runs the tests and generates output for
5# errors.  No output means no errors were found.
6#
7# Copyright (c) 1993 The Regents of the University of California.
8# Copyright (c) 1994 Sun Microsystems, Inc.
9# Copyright (c) 1998-1999 by Scriptics Corporation.
10#
11# See the file "license.terms" for information on usage and redistribution
12# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13#
14# RCS: @(#) $Id: dcall.test,v 1.6 2004/05/19 10:54:20 dkf Exp $
15
16if {[lsearch [namespace children] ::tcltest] == -1} {
17    package require tcltest
18    namespace import -force ::tcltest::*
19}
20
21testConstraint testdcall [llength [info commands testdcall]]
22
23test dcall-1.1 {deletion callbacks} testdcall {
24    lsort -increasing [testdcall 1 2 3]
25} {1 2 3}
26test dcall-1.2 {deletion callbacks} testdcall {
27    testdcall
28} {}
29test dcall-1.3 {deletion callbacks} testdcall {
30    lsort -increasing [testdcall 20 21 22 -22]
31} {20 21}
32test dcall-1.4 {deletion callbacks} testdcall {
33    lsort -increasing [testdcall 20 21 22 -20]
34} {21 22}
35test dcall-1.5 {deletion callbacks} testdcall {
36    lsort -increasing [testdcall 20 21 22 -21]
37} {20 22}
38test dcall-1.6 {deletion callbacks} testdcall {
39    lsort -increasing [testdcall 20 21 22 -21 -22 -20]
40} {}
41
42# cleanup
43::tcltest::cleanupTests
44return
Note: See TracBrowser for help on using the repository browser.