(t *testing.T)
| 243 | } |
| 244 | |
| 245 | func TestNewNodeNodeListPosition(t *testing.T) { |
| 246 | n1 := node.NewIdentifier("test node") |
| 247 | n1.SetPosition(&position.Position{ |
| 248 | StartLine: 1, |
| 249 | EndLine: 1, |
| 250 | StartPos: 0, |
| 251 | EndPos: 8, |
| 252 | }) |
| 253 | |
| 254 | n2 := node.NewIdentifier("test node") |
| 255 | n2.SetPosition(&position.Position{ |
| 256 | StartLine: 2, |
| 257 | EndLine: 2, |
| 258 | StartPos: 9, |
| 259 | EndPos: 17, |
| 260 | }) |
| 261 | |
| 262 | n3 := node.NewIdentifier("test node") |
| 263 | n3.SetPosition(&position.Position{ |
| 264 | StartLine: 3, |
| 265 | EndLine: 3, |
| 266 | StartPos: 18, |
| 267 | EndPos: 26, |
| 268 | }) |
| 269 | |
| 270 | builder := positionbuilder.PositionBuilder{} |
| 271 | |
| 272 | pos := builder.NewNodeNodeListPosition(n1, []node.Node{n2, n3}) |
| 273 | |
| 274 | if pos.String() != `Pos{Line: 1-3 Pos: 0-26}` { |
| 275 | t.Errorf("token value is not equal\n") |
| 276 | } |
| 277 | } |
| 278 | |
| 279 | func TestNewNodeListNodePosition(t *testing.T) { |
| 280 | n1 := node.NewIdentifier("test node") |
nothing calls this directly
no test coverage detected
searching dependent graphs…