aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/go/smart_pointer_typedef_runme.go
blob: a67a0ccdad420437815b4a0061803ca8f6ac55d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package main

import . "./smart_pointer_typedef"

func main() {
	f := NewFoo()
	b := NewBar(f)

	b.SetX(3)
	if b.Getx() != 3 {
		panic(0)
	}

	fp := b.X__deref__()
	fp.SetX(4)
	if fp.Getx() != 4 {
		panic(0)
	}
}