From 28fbeaaa88ba1ba92a8143cdc2a77d6ab1ae497f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 25 Feb 2025 09:33:14 +0000 Subject: int -> Tcl_Size updates to Utf(3), minor markup update --- doc/Utf.3 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/Utf.3 b/doc/Utf.3 index fc7311e..14516e9 100644 --- a/doc/Utf.3 +++ b/doc/Utf.3 @@ -45,13 +45,13 @@ unsigned short * wchar_t * \fBTcl_UtfToWCharDString\fR(\fIsrc, numBytes, dsPtr\fR) .sp -int +Tcl_Size \fBTcl_Char16Len\fR(\fIutf16\fR) .sp -int +Tcl_Size \fBTcl_WCharLen\fR(\fIwcharStr\fR) .sp -int +Tcl_Size \fBTcl_UniCharLen\fR(\fIuniStr\fR) .sp int @@ -72,7 +72,7 @@ int int \fBTcl_UtfCharComplete\fR(\fIsrc, numBytes\fR) .sp -int +Tcl_Size \fBTcl_NumUtfChars\fR(\fIsrc, numBytes\fR) .sp const char * @@ -214,7 +214,7 @@ operate on sequences of \fBUTF-16\fR units instead of \fBTcl_UniChar\fR. characters. It accepts a null-terminated UTF-16 sequence and returns the number of UTF-16 units until the null. .PP -\fBTcl_WCharLen\fR corresponds to \fBstrlen\fR for wchar_t +\fBTcl_WCharLen\fR corresponds to \fBstrlen\fR for \fBwchar_t\fR characters. It accepts a null-terminated \fBwchar_t\fR sequence and returns the number of \fBwchar_t\fR units until the null. .PP -- cgit v0.12 From 52e2e677d7cd81ead9dab8ccd5ed97d0d28f816b Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 26 Feb 2025 18:19:26 +0000 Subject: dup test names --- tests/expr.test | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/expr.test b/tests/expr.test index 54995fb..b9484aa 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -7322,29 +7322,30 @@ foreach {v r} { -Inf infinite NaN nan } { - if {[regexp {[/\*]} $v]} { set v [expr $v] } - test expr-58.1($v)=$r "float classification: fpclassify($v) eq $r" { + set changed 0 + if {[regexp {[/\*]} $v]} { set v [expr $v]; set changed 1 } + test expr-58.1($v)=$r-$changed "float classification: fpclassify($v) eq $r" { fpclassify $v } $r - test expr-58.2($v) "float classification: isfinite($v)" { + test expr-58.2($v)-$changed "float classification: isfinite($v)" { expr {isfinite($v)} } [expr {$r ni {"infinite" "nan"}}] - test expr-58.3($v) "float classification: isinf($v)" { + test expr-58.3($v)-$changed "float classification: isinf($v)" { expr {isinf($v)} } [expr {$r eq "infinite"}] - test expr-58.4($v) "float classification: isnan($v)" { + test expr-58.4($v)-$changed "float classification: isnan($v)" { expr {isnan($v)} } [expr {$r eq "nan"}] - test expr-58.5($v) "float classification: isnormal($v)" { + test expr-58.5($v)-$changed "float classification: isnormal($v)" { expr {isnormal($v)} } [expr {$r eq "normal"}] - test expr-58.6($v) "float classification: issubnormal($v)" { + test expr-58.6($v)-$changed "float classification: issubnormal($v)" { expr {issubnormal($v)} } [expr {$r eq "subnormal"}] - test expr-58.7($v) "float classification: isunordered(0 and $v)" { + test expr-58.7($v)-$changed "float classification: isunordered(0 and $v)" { expr {isunordered(0,$v) + isunordered($v,0)} } [expr {$r eq "nan" ? 2 : 0}] - test expr-58.9($v) "float classification: isunordered(NaN and $v)" { + test expr-58.8($v)-$changed "float classification: isunordered(NaN and $v)" { expr {isunordered(NaN,$v) + isunordered($v,NaN)} } 2 } -- cgit v0.12 From 72bb6de9a0cd0e70c6f0661fd8070624957810d7 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 26 Feb 2025 20:23:23 +0000 Subject: Do not use the character "-" in a test constraint name. When tcltest sees it, it does not process as a constraint, but converts to interpretation as a constraint expression. what you mean to be the constraint "a-b" is processed as a combination of the constraints "a" and "b". This makes it impossible to use tcltest command line options to perform constraint-limited testing on variations of constraint values. --- tests/appendComp.test | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/appendComp.test b/tests/appendComp.test index 3a18404..0fafc6a 100644 --- a/tests/appendComp.test +++ b/tests/appendComp.test @@ -271,7 +271,7 @@ test appendComp-7.2 {lappend var triggers read trace, index var} -setup { return $::result } bar -} -result {myvar {} read} -constraints {bug-3057639} +} -result {myvar {} read} -constraints {bug_3057639} test appendComp-7.3 {lappend var triggers read trace, stack var} -setup { unset -nocomplain ::result unset -nocomplain ::myvar @@ -283,7 +283,7 @@ test appendComp-7.3 {lappend var triggers read trace, stack var} -setup { return $::result } bar -} -result {::myvar {} r} -constraints {bug-3057639} +} -result {::myvar {} r} -constraints {bug_3057639} test appendComp-7.4 {lappend var triggers read trace, array var} -setup { unset -nocomplain ::result } -body { @@ -296,7 +296,7 @@ test appendComp-7.4 {lappend var triggers read trace, array var} -setup { return $::result } bar -} -result {myvar b read} -constraints {bug-3057639} +} -result {myvar b read} -constraints {bug_3057639} test appendComp-7.5 {lappend var triggers read trace, array var} -setup { unset -nocomplain ::result } -body { @@ -321,7 +321,7 @@ test appendComp-7.6 {lappend var triggers read trace, array var exists} -setup { return $::result } bar -} -result {myvar b read} -constraints {bug-3057639} +} -result {myvar b read} -constraints {bug_3057639} test appendComp-7.7 {lappend var triggers read trace, array stack var} -setup { unset -nocomplain ::myvar unset -nocomplain ::result @@ -333,7 +333,7 @@ test appendComp-7.7 {lappend var triggers read trace, array stack var} -setup { return $::result } bar -} -result {::myvar b read} -constraints {bug-3057639} +} -result {::myvar b read} -constraints {bug_3057639} test appendComp-7.8 {lappend var triggers read trace, array stack var} -setup { unset -nocomplain ::myvar unset -nocomplain ::result -- cgit v0.12 From 9eb4cedf83376a1b1cfa52c62c3800f9c923099c Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 26 Feb 2025 20:33:34 +0000 Subject: another one --- tests/zipfs.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/zipfs.test b/tests/zipfs.test index 97dba53..06aa5f6 100644 --- a/tests/zipfs.test +++ b/tests/zipfs.test @@ -669,7 +669,7 @@ namespace eval test_ns_zipfs { mount [zippath test.zip] set newmount [file join [zipfs root] test testdir] mount [zippath test-overlay.zip] $newmount - } -constraints bug-4ae42446ab -cleanup { + } -constraints bug_4ae42446ab -cleanup { cleanup } -body { # KNOWN BUG. The test2 file is also present in parent mount. -- cgit v0.12 From 74163d999b5c98fb62f26421390860bac3352dce Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 26 Feb 2025 20:45:46 +0000 Subject: More constraint name repair --- tests/bigdata.test | 18 +++++++++--------- tests/listObj.test | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/bigdata.test b/tests/bigdata.test index a7db497..6b5b501 100644 --- a/tests/bigdata.test +++ b/tests/bigdata.test @@ -139,7 +139,7 @@ test script-bytecode-length-bigdata-1 {Test bytecode length limit} -body { catch $s r e } -cleanup { bigClean -} -constraints panic-in-EnterCmdStartData +} -constraints panicInEnterCmdStartData # # string cat @@ -321,7 +321,7 @@ bigtestRO string-map-bigdata-1 {string map} {5 0 0 5} -body { set s [bigString 0x100000000] } -cleanup { bigClean -} -constraints bug-takesTooLong +} -constraints bugTakesTooLong # # string match @@ -681,7 +681,7 @@ bigtestRO regexp-bigdata-2 "regexp with capture" 1 -body { set s [bigString 0x10000000a 0x100000009] } -cleanup { bigClean digits match -} -constraints bug-takesTooLong +} -constraints bugTakesTooLong # # regsub @@ -691,14 +691,14 @@ bigtestRO regsub-bigdata-1 "regsub" X -body { set s [bigString 0x100000001 0x100000000] } -cleanup { bigClean -} -constraints bug-takesTooLong +} -constraints bugTakesTooLong bigtestRO regsub-bigdata-2 "regsub" 1 -body { string equal [regsub -all \\d $s x] [string cat [string repeat x 0x100000000] X] } -setup { set s [bigString 0x100000001 0x100000000] } -cleanup { bigClean -} -constraints bug-takesTooLong +} -constraints bugTakesTooLong # # subst @@ -869,7 +869,7 @@ bigtest ledit-bigdata-3 "ledit - small -> large result" {2147483650 2147483650 { set l [bigList 2147483642] } -cleanup { bigClean -} -constraints memory-allocation-panic +} -constraints memoryAllocationPanic # # lindex @@ -1027,7 +1027,7 @@ bigtest lreplace-bigdata-2 "lreplace - large result" {4294967301 {a b c d e 0 1 #set l [bigList 4294967296] } -cleanup { bigClean -} -constraints bug-outofmemorypanic +} -constraints bugOutOfMemoryPanic # # lsearch @@ -1058,7 +1058,7 @@ bigtest lseq-bigdata-2 "lseq" {9223372036854775807 9223372036854775799} -body { set l [lseq 0x7fffffffffffffff]; llength $l } -cleanup { bigClean -} -constraints bug-fa00fbbbab +} -constraints bug_fa00fbbbab # # lset @@ -1103,7 +1103,7 @@ bigtest split-bigdata-1 "split" {4294967296 {0 1 2 3 4} {1 2 3 4 5}} -body { set s [bigString 0x100000000] } -cleanup { bigClean -} -constraints bug-takesTooLong +} -constraints bugTakesTooLong bigtestRO concat-bigdata-1 "concat" {4294967296 {0 1 2 3 4} {6 7 0 1 2} {3 4 5 6 7}} -body { unset -nocomplain l2 diff --git a/tests/listObj.test b/tests/listObj.test index 7aac480..087747f 100644 --- a/tests/listObj.test +++ b/tests/listObj.test @@ -319,7 +319,7 @@ test listobj-14.2 {Tcl_ListObjIndex out-of-bounds index for native lists with sp list [testlistobj index 1 -1] [testlistobj index 1 1000] } -result {null null} -test listobj-14.3 {Tcl_ListObjIndex out-of-bounds index for lseq} -constraints {bug-30e4e9102f testobj} -setup { +test listobj-14.3 {Tcl_ListObjIndex out-of-bounds index for lseq} -constraints {bug_30e4e9102f testobj} -setup { testobj set 1 [lseq 3] } -cleanup { testobj freeallvars -- cgit v0.12