source: tol/tol_tests/toltcl/Bugzilla/bug_000433/test.tcl @ 97ca359

1941-docker-image-to-testdevel
Last change on this file since 97ca359 was 97ca359, checked in by Jorge Pérez <josp.jorge@…>, 18 years ago

toltcl tests updated to Toltcl changes in object references

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@410 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 1.1 KB
Line 
1# This is a test file to verify the report
2# http://bugs.tol-project.org/show_bug.cgi?id=433
3#
4# - a timeset expression is created in the console
5# - a timeset iterator is created for that timeset
6# - try to release the console stack
7# - verify that the imeset is still in the stack
8# - destroy the timeset iterator
9# - try again to release the console stack
10# - check that the stack is empty and the timeset does not exists
11#
12
13proc on_stack { name } {
14  foreach obj  [tol::console stack list] {
15    if {[lindex $obj 1] eq "tms1"} {
16      return 1
17    }
18  }
19  return 0
20}
21
22tol::console eval {
23  TimeSet tms1 = D(1);
24  TimeSet tms2 = D(2);
25}
26tol::timeset create iter_tms1 {TimeSet tms1}
27tol::console stack release stack
28if {![on_stack "tms1"]} {
29  set quality 0.0
30  set partial "tms1 was released from the console stack unexpectly"
31} else {
32  tol::timeset destroy iter_tms1
33  tol::console stack release
34  if {[on_stack "tms1"]} {
35    set quality 0.0
36    set partial "tms1 is still on console stack"
37  } else {
38    set quality 1.0
39    set partial "all timeset successfully removed from console stack"
40  }
41}
Note: See TracBrowser for help on using the repository browser.