URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [insight/] [tcl/] [tests/] [dcall.test] - Blame information for rev 1780
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
# 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 |
|
|
#
|
10 |
|
|
# See the file "license.terms" for information on usage and redistribution
|
11 |
|
|
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
12 |
|
|
#
|
13 |
|
|
# RCS: @(#) $Id: dcall.test,v 1.1.1.1 2002-01-16 10:25:35 markom Exp $
|
14 |
|
|
|
15 |
|
|
if {[info commands testdcall] == {}} {
|
16 |
|
|
puts "This application hasn't been compiled with the \"testdcall\""
|
17 |
|
|
puts "command, so I can't test Tcl_CallWhenDeleted."
|
18 |
|
|
return
|
19 |
|
|
}
|
20 |
|
|
|
21 |
|
|
if {[string compare test [info procs test]] == 1} then {source defs}
|
22 |
|
|
|
23 |
|
|
test dcall-1.1 {deletion callbacks} {
|
24 |
|
|
lsort -increasing [testdcall 1 2 3]
|
25 |
|
|
} {1 2 3}
|
26 |
|
|
test dcall-1.2 {deletion callbacks} {
|
27 |
|
|
testdcall
|
28 |
|
|
} {}
|
29 |
|
|
test dcall-1.3 {deletion callbacks} {
|
30 |
|
|
lsort -increasing [testdcall 20 21 22 -22]
|
31 |
|
|
} {20 21}
|
32 |
|
|
test dcall-1.4 {deletion callbacks} {
|
33 |
|
|
lsort -increasing [testdcall 20 21 22 -20]
|
34 |
|
|
} {21 22}
|
35 |
|
|
test dcall-1.5 {deletion callbacks} {
|
36 |
|
|
lsort -increasing [testdcall 20 21 22 -21]
|
37 |
|
|
} {20 22}
|
38 |
|
|
test dcall-1.6 {deletion callbacks} {
|
39 |
|
|
lsort -increasing [testdcall 20 21 22 -21 -22 -20]
|
40 |
|
|
} {}
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.