File: paren_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 (39 lines) | stat: -rw-r--r-- 977 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
32
33
34
35
36
37
38
39
package ast

import (
	"testing"
)

func TestParenExpr(t *testing.T) {
	nodes := map[string]Node{
		`0x7fb0bc8b2308 <col:10, col:25> 'unsigned char'`: &ParenExpr{
			Addr:       0x7fb0bc8b2308,
			Pos:        NewPositionFromString("col:10, col:25"),
			Type:       "unsigned char",
			Type2:      "",
			Lvalue:     false,
			IsBitfield: false,
			ChildNodes: []Node{},
		},
		`0x1ff8708 <col:14, col:17> 'T_ENUM':'T_ENUM' lvalue`: &ParenExpr{
			Addr:       0x1ff8708,
			Pos:        NewPositionFromString("col:14, col:17"),
			Type:       "T_ENUM",
			Type2:      "T_ENUM",
			Lvalue:     true,
			IsBitfield: false,
			ChildNodes: []Node{},
		},
		`0x55efc60798b0 <col:15, col:27> 'bft':'unsigned int' lvalue bitfield`: &ParenExpr{
			Addr:       0x55efc60798b0,
			Pos:        NewPositionFromString("col:15, col:27"),
			Type:       "bft",
			Type2:      "unsigned int",
			Lvalue:     true,
			IsBitfield: true,
			ChildNodes: []Node{},
		},
	}

	runNodeTests(t, nodes)
}