projects
/
external
/
swig.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
import source from 1.3.40
[external/swig.git]
/
Examples
/
test-suite
/
octave
/
smart_pointer_overload_runme.m
1
smart_pointer_overload
2
3
f = Foo();
4
b = Bar(f);
5
6
7
if (f.test(3) != 1)
8
error
9
endif
10
if (f.test(3.5) != 2)
11
error
12
endif
13
if (f.test("hello") != 3)
14
error
15
endif
16
17
if (b.test(3) != 1)
18
error
19
endif
20
if (b.test(3.5) != 2)
21
error
22
endif
23
if (b.test("hello") != 3)
24
error
25
endif
26
27