diff options
author | kennykb <kennykb@noemail.net> | 2007-05-02 01:37:27 (GMT) |
---|---|---|
committer | kennykb <kennykb@noemail.net> | 2007-05-02 01:37:27 (GMT) |
commit | 5f22ea04e0218ad3c09d0b0e6fc816b5beefe804 (patch) | |
tree | d6872063b78f6f9c99c9ef9e61339e55608299fe | |
parent | de45005f22f7e89b06b0f710a5fc5b8614a40918 (diff) | |
download | tcl-5f22ea04e0218ad3c09d0b0e6fc816b5beefe804.zip tcl-5f22ea04e0218ad3c09d0b0e6fc816b5beefe804.tar.gz tcl-5f22ea04e0218ad3c09d0b0e6fc816b5beefe804.tar.bz2 |
* tests/utf.test (utf-25.1--utf-25.4): Modified tests to
clean up after the 'testobj' extension to avoid spurious
reports of memory leaks.
FossilOrigin-Name: 896874db577d01d739c0734b5be8d6d377b0e585
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | tests/utf.test | 100 |
2 files changed, 70 insertions, 33 deletions
@@ -11,6 +11,9 @@ first. [Bug 1710285] * generic/tclThread.c (TclFinalizeSynchronization): Make sure that TSD blocks get freed on non-threaded builds. [Bug 1710825] + * tests/utf.test (utf-25.1--utf-25.4): Modified tests to + clean up after the 'testobj' extension to avoid spurious + reports of memory leaks. 2007-05-01 Don Porter <dgp@users.sourceforge.net> diff --git a/tests/utf.test b/tests/utf.test index d5df773..575a5cd 100644 --- a/tests/utf.test +++ b/tests/utf.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: utf.test,v 1.13 2005/09/07 15:31:10 dgp Exp $ +# RCS: @(#) $Id: utf.test,v 1.14 2007/05/02 01:37:28 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -319,39 +319,73 @@ test utf-24.4 {unicode space char in regc_locale.c} { } {1 1} testConstraint teststringobj [llength [info commands teststringobj]] -test utf-25.1 {Tcl_UniCharNcasecmp} teststringobj { - testobj freeallvars - teststringobj set 1 a - teststringobj set 2 b - teststringobj getunicode 1 - teststringobj getunicode 2 - string compare -nocase [teststringobj get 1] [teststringobj get 2] -} -1 -test utf-25.2 {Tcl_UniCharNcasecmp} teststringobj { - testobj freeallvars - teststringobj set 1 b - teststringobj set 2 a - teststringobj getunicode 1 - teststringobj getunicode 2 - string compare -nocase [teststringobj get 1] [teststringobj get 2] -} 1 -test utf-25.3 {Tcl_UniCharNcasecmp} teststringobj { - testobj freeallvars - teststringobj set 1 B - teststringobj set 2 a - teststringobj getunicode 1 - teststringobj getunicode 2 - string compare -nocase [teststringobj get 1] [teststringobj get 2] -} 1 -test utf-25.4 {Tcl_UniCharNcasecmp} teststringobj { - testobj freeallvars - teststringobj set 1 aBcB - teststringobj set 2 abca - teststringobj getunicode 1 - teststringobj getunicode 2 - string compare -nocase [teststringobj get 1] [teststringobj get 2] -} 1 + +test utf-25.1 {Tcl_UniCharNcasecmp} -constraints teststringobj \ + -setup { + testobj freeallvars + } \ + -body { + teststringobj set 1 a + teststringobj set 2 b + teststringobj getunicode 1 + teststringobj getunicode 2 + string compare -nocase [teststringobj get 1] [teststringobj get 2] + } \ + -cleanup { + testobj freeallvars + } \ + -result -1 +test utf-25.2 {Tcl_UniCharNcasecmp} -constraints teststringobj \ + -setup { + testobj freeallvars + } \ + -body { + teststringobj set 1 b + teststringobj set 2 a + teststringobj getunicode 1 + teststringobj getunicode 2 + string compare -nocase [teststringobj get 1] [teststringobj get 2] + } \ + -cleanup { + testobj freeallvars + } \ + -result 1 +test utf-25.3 {Tcl_UniCharNcasecmp} -constraints teststringobj \ + -setup { + testobj freeallvars + } \ + -body { + teststringobj set 1 B + teststringobj set 2 a + teststringobj getunicode 1 + teststringobj getunicode 2 + string compare -nocase [teststringobj get 1] [teststringobj get 2] + } \ + -cleanup { + testobj freeallvars + } \ + -result 1 + +test utf-25.4 {Tcl_UniCharNcasecmp} -constraints teststringobj \ + -setup { + testobj freeallvars + } \ + -body { + teststringobj set 1 aBcB + teststringobj set 2 abca + teststringobj getunicode 1 + teststringobj getunicode 2 + string compare -nocase [teststringobj get 1] [teststringobj get 2] + } \ + -cleanup { + testobj freeallvars + } \ + -result 1 # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: |