File: init_list_expr_test.go

package info (click to toggle)
c2go 0.26.11-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,052 kB
  • sloc: ansic: 6,037; sh: 82; makefile: 5
file content (31 lines) | stat: -rw-r--r-- 842 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package ast

import (
	"testing"
)

func TestInitListExpr(t *testing.T) {
	nodes := map[string]Node{
		`0x7fbdd1906c20 <col:52, line:17160:1> 'const unsigned char [256]'`: &InitListExpr{
			Addr:       0x7fbdd1906c20,
			Pos:        NewPositionFromString("col:52, line:17160:1"),
			Type1:      "const unsigned char [256]",
			ChildNodes: []Node{},
		},
		`0x32017f0 <col:24, col:41> 'struct node [2]'`: &InitListExpr{
			Addr:       0x32017f0,
			Pos:        NewPositionFromString("col:24, col:41"),
			Type1:      "struct node [2]",
			ChildNodes: []Node{},
		},
		`0x3201840 <col:25, col:31> 'struct node':'struct node'`: &InitListExpr{
			Addr:       0x3201840,
			Pos:        NewPositionFromString("col:25, col:31"),
			Type1:      "struct node",
			Type2:      "struct node",
			ChildNodes: []Node{},
		},
	}

	runNodeTests(t, nodes)
}