nswrap/ast/unavailable_attr_test.go

35 lines
847 B
Go
Raw Normal View History

2019-05-31 10:21:04 -04:00
package ast
import (
"testing"
)
func TestUnavailableAttr(t *testing.T) {
2019-06-04 00:14:04 -04:00
nodes := map[string]testNode{
`0x7faa18a445d8 <line:66:45> "" IR_None`: testNode{&UnavailableAttr{
Addr: 0x7faa18a445d8,
Pos: NewPositionFromString("line:66:45"),
Position2: "",
Content: `"" IR_None`,
ChildNodes: []Node{},
2019-05-31 10:21:04 -04:00
},
0x7faa18a445d8,
NewPositionFromString("line:66:45"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
`0x7faa18a289f8 <line:150:54, col:70> "use a (__bridge id) cast instead" IR_None`: testNode{&UnavailableAttr{
Addr: 0x7faa18a289f8,
Pos: NewPositionFromString("line:150:54, col:70"),
Position2: "",
Content: `"use a (__bridge id) cast instead" IR_None`,
ChildNodes: []Node{},
2019-05-31 10:21:04 -04:00
},
0x7faa18a289f8,
NewPositionFromString("line:150:54, col:70"),
[]Node{},
2019-06-04 00:14:04 -04:00
},
2019-05-31 10:21:04 -04:00
}
runNodeTests(t, nodes)
}