PageRenderTime 16ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/tcl/bools_runme.tcl

#
TCL | 73 lines | 55 code | 15 blank | 3 comment | 27 complexity | 5490d0086480b2810ec64069e584071b MD5 | raw file
 1
 2if [ catch { load ./bools[info sharedlibextension] bools} err_msg ] {
 3	puts stderr "Could not load shared object:\n$err_msg"
 4}
 5
 6# bool constant check
 7if {$constbool != 0} {
 8    puts stderr "Runtime test 1 failed"
 9    exit 1
10}
11
12# bool variables check
13if {$bool1 != 1} {
14    puts stderr "Runtime test 2 failed"
15    exit 1
16}
17
18if {$bool2 != 0} {
19    puts stderr "Runtime test 3 failed"
20    exit 1
21}
22
23if { [ value $pbool ] != $bool1} {
24    puts stderr "Runtime test 4 failed"
25    exit 1
26}
27
28if { [ value $rbool ] != $bool2} {
29    puts stderr "Runtime test 5 failed"
30    exit 1
31}
32
33if { [ value $const_pbool ] != $bool1} {
34    puts stderr "Runtime test 6 failed"
35    exit 1
36}
37
38if { $const_rbool != $bool2} {
39    puts stderr "Runtime test 7 failed"
40    exit 1
41}
42
43# bool functions check
44if { [ bo 0 ] != 0} {
45    puts stderr "Runtime test 8 failed"
46    exit 1
47}
48
49if { [ bo 1 ] != 1} {
50    puts stderr "Runtime test 9 failed"
51    exit 1
52}
53
54if { [ value  [ rbo $rbool ] ] !=  [ value $rbool ]} {
55    puts stderr "Runtime test 10 failed"
56    exit 1
57}
58
59if { [ value  [ pbo $pbool ] ] !=  [ value $pbool ]} {
60    puts stderr "Runtime test 11 failed"
61    exit 1
62}
63
64if { [ const_rbo $const_rbool ] !=   $const_rbool } {
65    puts stderr "Runtime test 12 failed"
66    exit 1
67}
68
69if { [ value  [ const_pbo $const_pbool ] ] !=  [ value $const_pbool ]} {
70    puts stderr "Runtime test 13 failed"
71    exit 1
72}
73