URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [insight/] [tcl/] [tests/] [assocd.test] - Blame information for rev 1774
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
# This file tests the AssocData facility of Tcl
|
2 |
|
|
#
|
3 |
|
|
# This file contains a collection of tests for one or more of the Tcl
|
4 |
|
|
# built-in commands. Sourcing this file into Tcl runs the tests and
|
5 |
|
|
# generates output for errors. No output means no errors were found.
|
6 |
|
|
#
|
7 |
|
|
# Copyright (c) 1991-1994 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: assocd.test,v 1.1.1.1 2002-01-16 10:25:35 markom Exp $
|
14 |
|
|
|
15 |
|
|
if {[string compare test [info procs test]] == 1} then {source defs}
|
16 |
|
|
|
17 |
|
|
if {[string compare testsetassocdata [info commands testsetassocdata]] != 0} {
|
18 |
|
|
puts "This application hasn't been compiled with the tests for assocData,"
|
19 |
|
|
puts "therefore I am skipping all of these tests."
|
20 |
|
|
return
|
21 |
|
|
}
|
22 |
|
|
|
23 |
|
|
test assocd-1.1 {testing setting assoc data} {
|
24 |
|
|
testsetassocdata a 1
|
25 |
|
|
} ""
|
26 |
|
|
test assocd-1.2 {testing setting assoc data} {
|
27 |
|
|
testsetassocdata a 2
|
28 |
|
|
} ""
|
29 |
|
|
test assocd-1.3 {testing setting assoc data} {
|
30 |
|
|
testsetassocdata 123 456
|
31 |
|
|
} ""
|
32 |
|
|
test assocd-1.4 {testing setting assoc data} {
|
33 |
|
|
testsetassocdata abc "abc d e f"
|
34 |
|
|
} ""
|
35 |
|
|
|
36 |
|
|
test assocd-2.1 {testing getting assoc data} {
|
37 |
|
|
testgetassocdata a
|
38 |
|
|
} 2
|
39 |
|
|
test assocd-2.2 {testing getting assoc data} {
|
40 |
|
|
testgetassocdata 123
|
41 |
|
|
} 456
|
42 |
|
|
test assocd-2.3 {testing getting assoc data} {
|
43 |
|
|
testgetassocdata abc
|
44 |
|
|
} {abc d e f}
|
45 |
|
|
test assocd-2.4 {testing getting assoc data} {
|
46 |
|
|
testgetassocdata xxx
|
47 |
|
|
} ""
|
48 |
|
|
|
49 |
|
|
test assocd-3.1 {testing deleting assoc data} {
|
50 |
|
|
testdelassocdata a
|
51 |
|
|
} ""
|
52 |
|
|
test assocd-3.2 {testing deleting assoc data} {
|
53 |
|
|
testdelassocdata 123
|
54 |
|
|
} ""
|
55 |
|
|
test assocd-3.3 {testing deleting assoc data} {
|
56 |
|
|
list [catch {testdelassocdata nonexistent} msg] $msg
|
57 |
|
|
} {0 {}}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.