PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/octave/using_composition_runme.m

#
Objective C | 43 lines | 31 code | 12 blank | 0 comment | 15 complexity | eec2b86d739001e9f7592dad8080449a MD5 | raw file
 1using_composition
 2
 3f = FooBar();
 4if (f.blah(3) != 3)
 5  error("FooBar::blah(int)")
 6endif
 7
 8if (f.blah(3.5) != 3.5)
 9  error("FooBar::blah(double)")
10endif
11
12if (!strcmp(f.blah("hello"),"hello"))
13  error("FooBar::blah(char *)")
14endif
15
16
17f = FooBar2();
18if (f.blah(3) != 3)
19  error("FooBar2::blah(int)")
20endif
21
22if (f.blah(3.5) != 3.5)
23  error("FooBar2::blah(double)")
24endif
25
26if (!strcmp(f.blah("hello"),"hello"))
27  error("FooBar2::blah(char *)")
28endif
29
30
31f = FooBar3();
32if (f.blah(3) != 3)
33  error("FooBar3::blah(int)")
34endif
35
36if (f.blah(3.5) != 3.5)
37  error("FooBar3::blah(double)")
38endif
39
40if (!strcmp(f.blah("hello"),"hello"))
41  error("FooBar3::blah(char *)")
42endif
43