2019-05-31 10:21:04 -04:00
|
|
|
package ast
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestObjCMethod(t *testing.T) {
|
2019-06-04 00:14:04 -04:00
|
|
|
i := 1
|
2019-05-31 10:21:04 -04:00
|
|
|
runNodeTest(t,
|
|
|
|
Parse(`ObjCMethod 0x7f84d10dc1d0 'isValid'`),
|
2019-06-04 00:14:04 -04:00
|
|
|
testNode{&ObjCMethod{
|
2019-05-31 10:21:04 -04:00
|
|
|
Addr: 0x7f84d10dc1d0,
|
|
|
|
Name: `isValid`,
|
|
|
|
ChildNodes: []Node{},
|
|
|
|
},
|
2019-06-11 12:38:22 -04:00
|
|
|
0x7f84d10dc1d0,
|
|
|
|
NewPositionFromString(""),
|
|
|
|
[]Node{},
|
2019-06-04 00:14:04 -04:00
|
|
|
},
|
|
|
|
&i,
|
2019-05-31 10:21:04 -04:00
|
|
|
)
|
|
|
|
runNodeTest(t,
|
|
|
|
Parse(`getter ObjCMethod 0x7f84d10dc1d0 'isValid'`),
|
2019-06-04 00:14:04 -04:00
|
|
|
testNode{&ObjCMethod{
|
2019-05-31 10:21:04 -04:00
|
|
|
Addr: 0x7f84d10dc1d0,
|
|
|
|
Name: `isValid`,
|
|
|
|
ChildNodes: []Node{},
|
|
|
|
},
|
2019-06-11 12:38:22 -04:00
|
|
|
0x7f84d10dc1d0,
|
|
|
|
NewPositionFromString(""),
|
|
|
|
[]Node{},
|
2019-06-04 00:14:04 -04:00
|
|
|
},
|
|
|
|
&i,
|
2019-05-31 10:21:04 -04:00
|
|
|
)
|
|
|
|
}
|