File: li_attribute_runme.py

package info (click to toggle)
swig1.3 1.3.36-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 27,060 kB
  • ctags: 13,774
  • sloc: cpp: 40,816; ansic: 27,565; python: 9,069; java: 6,432; makefile: 5,065; yacc: 4,916; cs: 4,551; sh: 4,071; ruby: 3,760; perl: 3,562; lisp: 1,993; tcl: 1,266; php: 1,026; ml: 708
file content (52 lines) | stat: -rw-r--r-- 677 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import li_attribute

aa = li_attribute.A(1,2,3)

if aa.a != 1:
  raise RuntimeError
aa.a = 3
if aa.a != 3:
  print aa.a
  raise RuntimeError


if aa.b != 2:
  print aa.b
  raise RuntimeError
aa.b = 5
if aa.b != 5:
  raise RuntimeError



if aa.d != aa.b:
  raise RuntimeError

if aa.c != 3:
  raise RuntimeError
#aa.c = 5
#if aa.c != 3:
#  raise RuntimeError

pi = li_attribute.Param_i(7)
if pi.value != 7:
 raise RuntimeError

pi.value=3
if pi.value != 3:
 raise RuntimeError


b = li_attribute.B(aa)

if b.a.c != 3:
 raise RuntimeError
  

myFoo = li_attribute.MyFoo
myFoo.x = 8
myClass = li_attribute.MyClass
myClass.Foo = myFoo
if myClass.Foo.x != 8:
  raise RuntimeError