summaryrefslogtreecommitdiff
path: root/Examples/test-suite/octave/li_attribute_runme.m
blob: c66e27c5bf643e9c1089fa93a72c7e03125a5ba3 (plain)
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
53
54
55
56
57
li_attribute

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

if (aa.a != 1)
  error
endif
aa.a = 3;
if (aa.a != 3)
  error("aa.a = %i",aa.a)
endif


if (aa.b != 2)
  error(aa.b)
endif
aa.b = 5;
if (aa.b != 5)
  error
endif



if (aa.d != aa.b)
  error
endif

if (aa.c != 3)
  error
endif

pi = li_attribute.Param_i(7);
if (pi.value != 7)
 error
endif

pi.value=3;
if (pi.value != 3)
 error
endif


b = li_attribute.B(aa);

if (b.a.c != 3)
 error
endif
  

myFoo = li_attribute.MyFoo();
myFoo.x = 8;
myClass = li_attribute.MyClass();
myClass.Foo = myFoo;
if (myClass.Foo.x != 8)
  error
endif