| OLD | NEW |
| 1 # 2001 September 15 | 1 # 2001 September 15 |
| 2 # | 2 # |
| 3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
| 4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
| 5 # | 5 # |
| 6 # May you do good and not evil. | 6 # May you do good and not evil. |
| 7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
| 8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
| 9 # | 9 # |
| 10 #*********************************************************************** | 10 #*********************************************************************** |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if {[lsearch -exact $EXCLUDE $tail]>=0} continue | 68 if {[lsearch -exact $EXCLUDE $tail]>=0} continue |
| 69 set LeakList {} | 69 set LeakList {} |
| 70 for {set COUNTER 0} {$COUNTER<$COUNT} {incr COUNTER} { | 70 for {set COUNTER 0} {$COUNTER<$COUNT} {incr COUNTER} { |
| 71 source $testfile | 71 source $testfile |
| 72 if {[info exists Leak]} { | 72 if {[info exists Leak]} { |
| 73 lappend LeakList $Leak | 73 lappend LeakList $Leak |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 if {$LeakList!=""} { | 76 if {$LeakList!=""} { |
| 77 puts -nonewline memory-leak-test-$tail... | 77 puts -nonewline memory-leak-test-$tail... |
| 78 incr ::nTest | 78 incr_ntest |
| 79 foreach x $LeakList { | 79 foreach x $LeakList { |
| 80 if {$x!=[lindex $LeakList 0]} { | 80 if {$x!=[lindex $LeakList 0]} { |
| 81 puts " failed! ($LeakList)" | 81 puts " failed! ($LeakList)" |
| 82 incr ::nErr | 82 fail_test memory-leak-test-$tail |
| 83 lappend ::failList memory-leak-test-$tail | |
| 84 break | 83 break |
| 85 } | 84 } |
| 86 } | 85 } |
| 87 puts " Ok" | 86 puts " Ok" |
| 88 } | 87 } |
| 89 } | 88 } |
| 90 memleak_finish_test | 89 memleak_finish_test |
| 91 | 90 |
| 92 # Run the malloc tests and the misuse test after memory leak detection. | 91 # Run the malloc tests and the misuse test after memory leak detection. |
| 93 # Both tests leak memory. | 92 # Both tests leak memory. |
| 94 # | 93 # |
| 95 #catch {source $testdir/misuse.test} | 94 #catch {source $testdir/misuse.test} |
| 96 #catch {source $testdir/malloc.test} | 95 #catch {source $testdir/malloc.test} |
| 97 | 96 |
| 98 memleak_finish_test | 97 memleak_finish_test |
| OLD | NEW |