summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-07-08 09:15:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-07-08 09:15:14 (GMT)
commit0d7fe7ab927115c625c3f11a3c724f0f3119e233 (patch)
tree8f7c44e671bbf0b36cdcb6ae1f50568a4f9c43dc
parentd3895a98d5dbbe80730949fb20b4ceeedbe0d2c5 (diff)
downloadtcl-0d7fe7ab927115c625c3f11a3c724f0f3119e233.zip
tcl-0d7fe7ab927115c625c3f11a3c724f0f3119e233.tar.gz
tcl-0d7fe7ab927115c625c3f11a3c724f0f3119e233.tar.bz2
Additional testcases (not only testing for lseq, but for list and dict as well)
-rw-r--r--tests/expr.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/expr.test b/tests/expr.test
index a13250b..b83e4c8 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -504,6 +504,12 @@ test expr-11.13b {CompileAddExpr: runtime error} ieeeFloatingPoint {
test expr-11.14 {CompileAddExpr: runtime error} {
list [catch {expr {24.0+[lseq 2 4]}} msg] $msg
} {1 {can't use a list as operand of "+"}}
+test expr-11.15 {CompileAddExpr: runtime error} {
+ list [catch {expr {24.0+{1 2 3}}} msg] $msg
+} {1 {can't use a list as operand of "+"}}
+test expr-11.16 {CompileAddExpr: runtime error} {
+ list [catch {expr {24.0+[dict create foo bar]}} msg] $msg
+} {1 {can't use a list as operand of "+"}}
test expr-12.1 {CompileMultiplyExpr: just unary expr} {expr ~4} -5
test expr-12.2 {CompileMultiplyExpr: just unary expr} {expr --5} 5
@@ -7233,6 +7239,12 @@ test expr-47.13 {isqrt and floating point rounding (Bug 2143288)} {
test expr-47.14 {isqrt() - lseq} {
list [catch {expr {isqrt([lseq 1 3])}} result] $result
} {1 {expected number but got a list}}
+test expr-47.15 {isqrt() - lseq} {
+ list [catch {expr {isqrt({1 2 3})}} result] $result
+} {1 {expected number but got a list}}
+test expr-47.16 {isqrt() - lseq} {
+ list [catch {expr {isqrt([dict create foo bar])}} result] $result
+} {1 {expected number but got a list}}
test expr-48.1 {Bug 1770224} {
expr {-0x8000000000000001 >> 0x8000000000000000}