Skip to content

Commit

Permalink
Merge pull request #68 from elliotchance/0.9.x/48-split-ast-tests
Browse files Browse the repository at this point in the history
Split ast tests
  • Loading branch information
elliotchance authored Apr 25, 2017
2 parents 1be6811 + 7a3bb7d commit 89ebb6a
Show file tree
Hide file tree
Showing 70 changed files with 1,759 additions and 1,134 deletions.
17 changes: 17 additions & 0 deletions ast/always_inline_attr_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package ast

import (
"testing"
)

func TestAlwaysInlineAttr(t *testing.T) {
nodes := map[string]Node{
`0x7fce780f5018 </usr/include/sys/cdefs.h:313:68> always_inline`: &AlwaysInlineAttr{
Address: "0x7fce780f5018",
Position: "/usr/include/sys/cdefs.h:313:68",
Children: []Node{},
},
}

runNodeTests(t, nodes)
}
19 changes: 19 additions & 0 deletions ast/array_subscript_expr_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package ast

import (
"testing"
)

func TestArraySubscriptExpr(t *testing.T) {
nodes := map[string]Node{
`0x7fe35b85d180 <col:63, col:69> 'char *' lvalue`: &ArraySubscriptExpr{
Address: "0x7fe35b85d180",
Position: "col:63, col:69",
Type: "char *",
Kind: "lvalue",
Children: []Node{},
},
}

runNodeTests(t, nodes)
}
18 changes: 18 additions & 0 deletions ast/asm_label_attr_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package ast

import (
"testing"
)

func TestAsmLabelAttr(t *testing.T) {
nodes := map[string]Node{
`0x7ff26d8224e8 </usr/include/sys/cdefs.h:569:36> "_fopen"`: &AsmLabelAttr{
Address: "0x7ff26d8224e8",
Position: "/usr/include/sys/cdefs.h:569:36",
FunctionName: "_fopen",
Children: []Node{},
},
}

runNodeTests(t, nodes)
}
Loading

0 comments on commit 89ebb6a

Please sign in to comment.