From 0d7fe7ab927115c625c3f11a3c724f0f3119e233 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 8 Jul 2024 09:15:14 +0000 Subject: Additional testcases (not only testing for lseq, but for list and dict as well) --- tests/expr.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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} -- cgit v0.12