os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/dcall.test
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/dcall.test Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,61 @@
1.4 +# Commands covered: none
1.5 +#
1.6 +# This file contains a collection of tests for Tcl_CallWhenDeleted.
1.7 +# Sourcing this file into Tcl runs the tests and generates output for
1.8 +# errors. No output means no errors were found.
1.9 +#
1.10 +# Copyright (c) 1993 The Regents of the University of California.
1.11 +# Copyright (c) 1994 Sun Microsystems, Inc.
1.12 +# Copyright (c) 1998-1999 by Scriptics Corporation.
1.13 +#
1.14 +# See the file "license.terms" for information on usage and redistribution
1.15 +# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
1.16 +#
1.17 +# RCS: @(#) $Id: dcall.test,v 1.5 2000/04/10 17:18:58 ericm Exp $
1.18 +
1.19 +if {[lsearch [namespace children] ::tcltest] == -1} {
1.20 + package require tcltest
1.21 + namespace import -force ::tcltest::*
1.22 +}
1.23 +
1.24 +if {[info commands testdcall] == {}} {
1.25 + puts "This application hasn't been compiled with the \"testdcall\""
1.26 + puts "command, so I can't test Tcl_CallWhenDeleted."
1.27 + ::tcltest::cleanupTests
1.28 + return
1.29 +}
1.30 +
1.31 +test dcall-1.1 {deletion callbacks} {
1.32 + lsort -increasing [testdcall 1 2 3]
1.33 +} {1 2 3}
1.34 +test dcall-1.2 {deletion callbacks} {
1.35 + testdcall
1.36 +} {}
1.37 +test dcall-1.3 {deletion callbacks} {
1.38 + lsort -increasing [testdcall 20 21 22 -22]
1.39 +} {20 21}
1.40 +test dcall-1.4 {deletion callbacks} {
1.41 + lsort -increasing [testdcall 20 21 22 -20]
1.42 +} {21 22}
1.43 +test dcall-1.5 {deletion callbacks} {
1.44 + lsort -increasing [testdcall 20 21 22 -21]
1.45 +} {20 22}
1.46 +test dcall-1.6 {deletion callbacks} {
1.47 + lsort -increasing [testdcall 20 21 22 -21 -22 -20]
1.48 +} {}
1.49 +
1.50 +# cleanup
1.51 +::tcltest::cleanupTests
1.52 +return
1.53 +
1.54 +
1.55 +
1.56 +
1.57 +
1.58 +
1.59 +
1.60 +
1.61 +
1.62 +
1.63 +
1.64 +