diff options
Diffstat (limited to 'tests/mathop.test')
-rw-r--r-- | tests/mathop.test | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/mathop.test b/tests/mathop.test index 61a106e..f122b7b 100644 --- a/tests/mathop.test +++ b/tests/mathop.test @@ -729,7 +729,7 @@ test mathop-20.2 { zero args, not allowed } { set exp {} foreach op {~ ! << >> % != ne in ni - /} { set res [TestOp $op] - if {[string match "wrong # args* NONE" $res]} { + if {[string match "wrong # args: should be * TCL WRONGARGS" $res]} { lappend exp 0 } else { lappend exp $res @@ -760,7 +760,7 @@ test mathop-20.5 { one arg, not allowed } { set exp {} foreach op {% != ne in ni << >>} { set res [TestOp $op 1] - if {[string match "wrong # args* NONE" $res]} { + if {[string match "wrong # args: should be * TCL WRONGARGS" $res]} { lappend exp 0 } else { lappend exp $res @@ -775,12 +775,14 @@ test mathop-20.6 { one arg, error } { # skipping - for now, knownbug... foreach op {+ * / & | ^ **} { lappend res [TestOp $op {*}$vals] - lappend exp "can't use non-numeric string as operand of \"$op\" ARITH DOMAIN {non-numeric string}" + lappend exp "can't use non-numeric string as operand of \"$op\"\ + ARITH DOMAIN {non-numeric string}" } } foreach op {+ * / & | ^ **} { lappend res [TestOp $op NaN 1] - lappend exp "can't use non-numeric floating-point value as operand of \"$op\" ARITH DOMAIN {non-numeric floating-point value}" + lappend exp "can't use non-numeric floating-point value as operand of \"$op\"\ + ARITH DOMAIN {non-numeric floating-point value}" } expr {$res eq $exp ? 0 : $res} } 0 @@ -863,7 +865,7 @@ test mathop-21.6 { unary ops, too many } { set exp {} foreach op {~ !} { set res [TestOp $op 7 8] - if {[string match "wrong # args* NONE" $res]} { + if {[string match "wrong # args: should be * TCL WRONGARGS" $res]} { lappend exp 0 } else { lappend exp $res @@ -1090,7 +1092,7 @@ test mathop-24.3 { binary ops, bad values } { } foreach op {in ni} { lappend res [TestOp $op 5 "a b \{ c"] - lappend exp "unmatched open brace in list NONE" + lappend exp "unmatched open brace in list TCL VALUE LIST BRACE" } lappend res [TestOp % 5 0] lappend exp "divide by zero ARITH DIVZERO {divide by zero}" @@ -1187,7 +1189,7 @@ test mathop-24.8 { binary ops, too many } { set exp {} foreach op {<< >> % != ne in ni ~ !} { set res [TestOp $op 7 8 9] - if {[string match "wrong # args* NONE" $res]} { + if {[string match "wrong # args: should be * TCL WRONGARGS" $res]} { lappend exp 0 } else { lappend exp $res |