nswrap/ast/objc_method_test.go

36 lines
591 B
Go
Raw Normal View History

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{},
},
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{},
},
0x7f84d10dc1d0,
NewPositionFromString(""),
[]Node{},
2019-06-04 00:14:04 -04:00
},
&i,
2019-05-31 10:21:04 -04:00
)
}