os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/dcall.test
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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.5 2000/04/10 17:18:58 ericm Exp $
    15 
    16 if {[lsearch [namespace children] ::tcltest] == -1} {
    17     package require tcltest
    18     namespace import -force ::tcltest::*
    19 }
    20 
    21 if {[info commands testdcall] == {}} {
    22     puts "This application hasn't been compiled with the \"testdcall\""
    23     puts "command, so I can't test Tcl_CallWhenDeleted."
    24     ::tcltest::cleanupTests
    25     return
    26 }
    27 
    28 test dcall-1.1 {deletion callbacks} {
    29     lsort -increasing [testdcall 1 2 3]
    30 } {1 2 3}
    31 test dcall-1.2 {deletion callbacks} {
    32     testdcall
    33 } {}
    34 test dcall-1.3 {deletion callbacks} {
    35     lsort -increasing [testdcall 20 21 22 -22]
    36 } {20 21}
    37 test dcall-1.4 {deletion callbacks} {
    38     lsort -increasing [testdcall 20 21 22 -20]
    39 } {21 22}
    40 test dcall-1.5 {deletion callbacks} {
    41     lsort -increasing [testdcall 20 21 22 -21]
    42 } {20 22}
    43 test dcall-1.6 {deletion callbacks} {
    44     lsort -increasing [testdcall 20 21 22 -21 -22 -20]
    45 } {}
    46 
    47 # cleanup
    48 ::tcltest::cleanupTests
    49 return
    50 
    51 
    52 
    53 
    54 
    55 
    56 
    57 
    58 
    59 
    60 
    61