summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-23 13:28:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-23 13:28:46 (GMT)
commit751bc99ae31b519bdd7557e2e9c387864896268e (patch)
tree168d0ce3e10d8d699c9a8ea8921b192c85b3bb93 /tests/clock.test
parent28573421f8d41f2919af73492bcf0b09ba499470 (diff)
downloadtcl-751bc99ae31b519bdd7557e2e9c387864896268e.zip
tcl-751bc99ae31b519bdd7557e2e9c387864896268e.tar.gz
tcl-751bc99ae31b519bdd7557e2e9c387864896268e.tar.bz2
Revise clock-6.10c? testcases
Diffstat (limited to 'tests/clock.test')
-rw-r--r--tests/clock.test26
1 files changed, 12 insertions, 14 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 7cb86a3..1db5af8 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -18532,27 +18532,25 @@ test clock-6.8 {input of seconds} {
} 9223372036854775807
test clock-6.9 {input of seconds - overflow} {
- list [catch {clock scan -9223372036854775809 -format %s -gmt true} result] $result $::errorCode
+ list [catch {clock scan -9223372036854775809 -format %s -gmt true} result opt] $result [dict getd $opt -errorcode ""]
} {1 {integer value too large to represent} {CLOCK dateTooLarge}}
-
test clock-6.10 {input of seconds - overflow} {
- list [catch {clock scan 9223372036854775808 -format %s -gmt true} result] $result $::errorCode
-} {1 {integer value too large to represent} {CLOCK dateTooLarge}}
-
-test clock-6.10a {input of seconds - overflow, bug [1f40aa83c5]} {
- list [catch {clock scan 27670116110564327423 -format %s -gmt true} result] $result $::errorCode
+ list [catch {clock scan 9223372036854775808 -format %s -gmt true} result opt] $result [dict getd $opt -errorcode ""]
} {1 {integer value too large to represent} {CLOCK dateTooLarge}}
-test clock-6.10b {input of seconds - overflow ??, bug [1f40aa83c5]} knownBug {
+foreach sign {{} -} {
+ test clock-6.10a$sign {input of seconds - overflow, bug [1f40aa83c5]} {
+ list [catch {clock scan ${sign}27670116110564327423 -format %s -gmt true} result opt] $result [dict getd $opt -errorcode ""]
+ } {1 {integer value too large to represent} {CLOCK dateTooLarge}}
+ test clock-6.10b$sign {input of seconds - overflow, bug [1f40aa83c5]} {
+ list [catch {clock scan ${sign}27670116110564327424 -format %s -gmt true} result opt] $result [dict getd $opt -errorcode ""]
+ } {1 {integer value too large to represent} {CLOCK dateTooLarge}}
+}; unset sign
+test clock-6.10c {input of seconds - overflow ??, bug [1f40aa83c5]} knownBug {
clock scan 27670116110564327423 -gmt true
} 89170590268800
-
-test clock-6.10c {input of seconds - overflow, bug [1f40aa83c5]} {
- list [catch {clock scan 27670116110564327424 -format %s -gmt true} result] $result $::errorCode
-} {1 {integer value too large to represent} {CLOCK dateTooLarge}}
-
test clock-6.10d {input of seconds - overflow ??, bug [1f40aa83c5]} knownBug {
- clock scan 27670116110564327424 -gmt true
+ clock scan 27670116110564327424 -gmt true
} -90247104115200
test clock-6.11 {input of seconds - two values} {