diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-05-19 10:42:00 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-05-19 10:42:00 (GMT) |
commit | 2294dc38b796a509f768e0db433a9e7430396d44 (patch) | |
tree | f65a83fd437d16f8e010c49ab8a9bbac513fc756 | |
parent | e2fad6a3fa1a1911c5c3014b6d9206aadcd7bf7e (diff) | |
download | tcl-2294dc38b796a509f768e0db433a9e7430396d44.zip tcl-2294dc38b796a509f768e0db433a9e7430396d44.tar.gz tcl-2294dc38b796a509f768e0db433a9e7430396d44.tar.bz2 |
Use constraints, not conditional invokation of test.
-rw-r--r-- | tests/assocd.test | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/tests/assocd.test b/tests/assocd.test index 34fb184..a677090 100644 --- a/tests/assocd.test +++ b/tests/assocd.test @@ -11,68 +11,53 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: assocd.test,v 1.5 2000/04/10 17:18:56 ericm Exp $ +# RCS: @(#) $Id: assocd.test,v 1.6 2004/05/19 10:42:00 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } -if {[string compare testsetassocdata [info commands testsetassocdata]] != 0} { - puts "This application hasn't been compiled with the tests for assocData," - puts "therefore I am skipping all of these tests." - ::tcltest::cleanupTests - return -} +testConstraint testgetassocdata [llength [info commands testgetassocdata]] +testConstraint testsetassocdata [llength [info commands testsetassocdata]] +testConstraint testdelassocdata [llength [info commands testdelassocdata]] -test assocd-1.1 {testing setting assoc data} { +test assocd-1.1 {testing setting assoc data} testsetassocdata { testsetassocdata a 1 } "" -test assocd-1.2 {testing setting assoc data} { +test assocd-1.2 {testing setting assoc data} testsetassocdata { testsetassocdata a 2 } "" -test assocd-1.3 {testing setting assoc data} { +test assocd-1.3 {testing setting assoc data} testsetassocdata { testsetassocdata 123 456 } "" -test assocd-1.4 {testing setting assoc data} { +test assocd-1.4 {testing setting assoc data} testsetassocdata { testsetassocdata abc "abc d e f" } "" -test assocd-2.1 {testing getting assoc data} { +test assocd-2.1 {testing getting assoc data} testgetassocdata { testgetassocdata a } 2 -test assocd-2.2 {testing getting assoc data} { +test assocd-2.2 {testing getting assoc data} testgetassocdata { testgetassocdata 123 } 456 -test assocd-2.3 {testing getting assoc data} { +test assocd-2.3 {testing getting assoc data} testgetassocdata { testgetassocdata abc } {abc d e f} -test assocd-2.4 {testing getting assoc data} { +test assocd-2.4 {testing getting assoc data} testgetassocdata { testgetassocdata xxx } "" -test assocd-3.1 {testing deleting assoc data} { +test assocd-3.1 {testing deleting assoc data} testdelassocdata { testdelassocdata a } "" -test assocd-3.2 {testing deleting assoc data} { +test assocd-3.2 {testing deleting assoc data} testdelassocdata { testdelassocdata 123 } "" -test assocd-3.3 {testing deleting assoc data} { +test assocd-3.3 {testing deleting assoc data} testdelassocdata { list [catch {testdelassocdata nonexistent} msg] $msg } {0 {}} # cleanup ::tcltest::cleanupTests return - - - - - - - - - - - - |