diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-01-13 20:30:03 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-01-13 20:30:03 (GMT) |
commit | 2982ceeb51c99eb042c8477125d3d1da80b84387 (patch) | |
tree | 01ade12b49117b7dbe4027f9ddff331b91731046 /tests | |
parent | 91fcbdbc1ce2836f8df968af33ce13bff991a90b (diff) | |
download | tcl-2982ceeb51c99eb042c8477125d3d1da80b84387.zip tcl-2982ceeb51c99eb042c8477125d3d1da80b84387.tar.gz tcl-2982ceeb51c99eb042c8477125d3d1da80b84387.tar.bz2 |
Move [throw] implementation into C.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/error.test | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/error.test b/tests/error.test index dfb466f..6125dd4 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.17 2008/12/16 22:07:58 dkf Exp $ +# RCS: @(#) $Id: error.test,v 1.18 2009/01/13 20:30:04 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -263,6 +263,21 @@ test error-8.4 {throw behaves as error does at level > 0} { } } } {} +test error-8.5 {throw syntax checks} -returnCodes error -body { + throw +} -result {wrong # args: should be "throw type message"} +test error-8.6 {throw syntax checks} -returnCodes error -body { + throw a +} -result {wrong # args: should be "throw type message"} +test error-8.7 {throw syntax checks} -returnCodes error -body { + throw a b c +} -result {wrong # args: should be "throw type message"} +test error-8.8 {throw syntax checks} -returnCodes error -body { + throw "not a \{ list" foo +} -result {unmatched open brace in list} +test error-8.9 {throw syntax checks} -returnCodes error -body { + throw {} foo +} -result {type must be non-empty list} # simple try tests: body completes with code ok |