diff options
-rw-r--r-- | jim.c | 2 | ||||
-rw-r--r-- | tests/binary.test | 18 | ||||
-rw-r--r-- | tests/format.test | 2 | ||||
-rw-r--r-- | tests/lsort.test | 2 |
4 files changed, 12 insertions, 12 deletions
@@ -6005,7 +6005,7 @@ static int SetDoubleFromAny(Jim_Interp *interp, Jim_Obj *objPtr) else { /* Try to convert into a double */ if (Jim_StringToDouble(str, &doubleValue) != JIM_OK) { - Jim_SetResultFormatted(interp, "expected number but got \"%#s\"", objPtr); + Jim_SetResultFormatted(interp, "expected floating-point number but got \"%#s\"", objPtr); return JIM_ERR; } /* Free the old internal repr and set the new one. */ diff --git a/tests/binary.test b/tests/binary.test index 8229390..3ba1970 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -421,7 +421,7 @@ test binary-13.1 {Tcl_BinaryObjCmd: format} { } {1 {not enough arguments for all format specifiers}} test binary-13.2 {Tcl_BinaryObjCmd: format} { list [catch {binary format f blat} msg] $msg -} {1 {expected number but got "blat"}} +} {1 {expected floating-point number but got "blat"}} test binary-13.3 {Tcl_BinaryObjCmd: format} { binary format f0 1.6 } {} @@ -467,7 +467,7 @@ test binary-13.16 {Tcl_BinaryObjCmd: format} { test binary-13.17 {Tcl_BinaryObjCmd: format} { set a {1.6 3.4} list [catch {binary format f $a} msg] $msg -} [list 1 "expected number but got \"1.6 3.4\""] +} [list 1 "expected floating-point number but got \"1.6 3.4\""] test binary-13.18 {Tcl_BinaryObjCmd: format} bigEndian { set a {1.6 3.4} binary format f1 $a @@ -482,7 +482,7 @@ test binary-14.1 {Tcl_BinaryObjCmd: format} { } {1 {not enough arguments for all format specifiers}} test binary-14.2 {Tcl_BinaryObjCmd: format} { list [catch {binary format d blat} msg] $msg -} {1 {expected number but got "blat"}} +} {1 {expected floating-point number but got "blat"}} test binary-14.3 {Tcl_BinaryObjCmd: format} { binary format d0 1.6 } {} @@ -516,7 +516,7 @@ test binary-14.14 {Tcl_BinaryObjCmd: format} { test binary-14.15 {Tcl_BinaryObjCmd: format} { set a {1.6 3.4} list [catch {binary format d $a} msg] $msg -} [list 1 "expected number but got \"1.6 3.4\""] +} [list 1 "expected floating-point number but got \"1.6 3.4\""] test binary-14.16 {Tcl_BinaryObjCmd: format} bigEndian { set a {1.6 3.4} binary format d1 $a @@ -1806,7 +1806,7 @@ test binary-51.1 {Tcl_BinaryObjCmd: format} { } {1 {not enough arguments for all format specifiers}} test binary-51.2 {Tcl_BinaryObjCmd: format} { list [catch {binary format q blat} msg] $msg -} {1 {expected number but got "blat"}} +} {1 {expected floating-point number but got "blat"}} test binary-51.3 {Tcl_BinaryObjCmd: format} { binary format q0 1.6 } {} @@ -1840,7 +1840,7 @@ test binary-51.14 {Tcl_BinaryObjCmd: format} { test binary-51.15 {Tcl_BinaryObjCmd: format} { set a {1.6 3.4} list [catch {binary format q $a} msg] $msg -} [list 1 "expected number but got \"1.6 3.4\""] +} [list 1 "expected floating-point number but got \"1.6 3.4\""] test binary-51.16 {Tcl_BinaryObjCmd: format} {} { set a {1.6 3.4} binary format Q1 $a @@ -1856,7 +1856,7 @@ test binary-53.1 {Tcl_BinaryObjCmd: format} { } {1 {not enough arguments for all format specifiers}} test binary-53.2 {Tcl_BinaryObjCmd: format} { list [catch {binary format r blat} msg] $msg -} {1 {expected number but got "blat"}} +} {1 {expected floating-point number but got "blat"}} test binary-53.3 {Tcl_BinaryObjCmd: format} { binary format f0 1.6 } {} @@ -1902,7 +1902,7 @@ test binary-53.16 {Tcl_BinaryObjCmd: format} { test binary-53.17 {Tcl_BinaryObjCmd: format} { set a {1.6 3.4} list [catch {binary format r $a} msg] $msg -} [list 1 "expected number but got \"1.6 3.4\""] +} [list 1 "expected floating-point number but got \"1.6 3.4\""] test binary-53.18 {Tcl_BinaryObjCmd: format} {} { set a {1.6 3.4} binary format R1 $a @@ -2397,7 +2397,7 @@ test binary-63.4 {NaN} {ieeeFloatingPoint notImplemented} { # Make sure TclParseNumber() rejects invalid nan-hex formats [Bug 3402540] test binary-63.5 {NaN} -constraints {ieeeFloatingPoint} -body { binary format q Nan( -} -returnCodes error -match glob -result {expected number*} +} -returnCodes error -match glob -result {expected floating-point number*} test binary-63.6 {NaN} -constraints {ieeeFloatingPoint notImplemented} -body { binary format q Nan() } -returnCodes error -match glob -result {expected floating-point number*} diff --git a/tests/format.test b/tests/format.test index d3d7f20..6a9ce85 100644 --- a/tests/format.test +++ b/tests/format.test @@ -329,7 +329,7 @@ test format-8.15 {error conditions} { test format-8.16 {error conditions} jim { catch {format %f 2.1z} msg set msg -} {expected number but got "2.1z"} +} {expected floating-point number but got "2.1z"} test format-8.17 {error conditions} { catch {format ab%} } 1 diff --git a/tests/lsort.test b/tests/lsort.test index 9d8ff86..28ebef6 100644 --- a/tests/lsort.test +++ b/tests/lsort.test @@ -181,7 +181,7 @@ test lsort-3.19 {SortCompare procedure, -decreasing option} { } {100 35 0x20 30 023 21 8} test lsort-3.20 {SortCompare procedure, -real option} -body { lsort -real {6...4 3} -} -returnCodes error -result {expected number but got "6...4"} +} -returnCodes error -result {expected floating-point number but got "6...4"} test lsort-3.21 {lsort, unique sort} { lsort -integer -unique {3 1 2 3 1 4 3} } {1 2 3 4} |