nswrap/ast/block_pointer_type_test.go

33 lines
657 B
Go
Raw Normal View History

2019-05-31 10:21:04 -04:00
package ast
import (
"testing"
)
func TestBlockPointerType(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
2019-05-31 10:21:04 -04:00
`0x7fa3b88bbb30 'void (^)(void)'`:
2019-06-04 00:14:04 -04:00
testNode{&BlockPointerType{
2019-05-31 10:21:04 -04:00
Addr: 0x7fa3b88bbb30,
Type: `void (^)(void)`,
ChildNodes: []Node{},
},
2019-06-04 00:14:04 -04:00
0x7fa3b88bbb30,
NewPositionFromString(""),
[]Node{},
},
2019-05-31 10:21:04 -04:00
`0x7fa3b88bbb30 'NSComparisonResult (^)(id _Nonnull, id _Nonnull)'`:
2019-06-04 00:14:04 -04:00
testNode{&BlockPointerType{
2019-05-31 10:21:04 -04:00
Addr: 0x7fa3b88bbb30,
Type: `NSComparisonResult (^)(id _Nonnull, id _Nonnull)`,
ChildNodes: []Node{},
},
2019-06-04 00:14:04 -04:00
0x7fa3b88bbb30,
NewPositionFromString(""),
[]Node{},
},
2019-05-31 10:21:04 -04:00
}
runNodeTests(t, nodes)
}