Restoring test cases removed by last commit.
[occt.git] / tests / bugs / caf / bug114
CommitLineData
5789daf9 1puts "==========="
2puts "OCC114"
3puts "==========="
4
5# Max number of iterations for computing memory leackage
6set i_max 20
7puts "Amount of iterations is $i_max"
8
9NewDocument D MDTV-Standard
10UndoLimit D 10
11
12restore [locate_data_file OCC114.brep] s
13
14set listmem {}
15for {set i 1} {${i} <= ${i_max}} {incr i} {
16
17 OpenCommand D
18 SetShape D 0:1 s
19 AbortCommand D
20
21 # check memory usage (with tolerance equal to half page size)
22 lappend listmem [expr [meminfo w] / 1024]
23 if { [checktrend $listmem 0 1 "Memory leak detected"] } {
24 puts "No memory leak, $i iterations"
25 break
26 }
27}