24 lines
		
	
	
		
			442 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			442 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package ast
 | |
| 
 | |
| import (
 | |
| 	"testing"
 | |
| )
 | |
| 
 | |
| func TestTargetAttr(t *testing.T) {
 | |
| 	nodes := map[string]testNode{
 | |
| 		`0x7fc0a69091d1 <line:11:7, line:18:7> content`:
 | |
| 		testNode{&TargetAttr{
 | |
| 			Addr:       0x7fc0a69091d1,
 | |
| 			Pos:        NewPositionFromString("line:11:7, line:18:7"),
 | |
| 			Content:    " content",
 | |
| 			ChildNodes: []Node{},
 | |
| 		},
 | |
| 		0x7fc0a69091d1,
 | |
| 		NewPositionFromString("line:11:7, line:18:7"),
 | |
| 		[]Node{},
 | |
| 		},
 | |
| 	}
 | |
| 
 | |
| 	runNodeTests(t, nodes)
 | |
| }
 |