1// Testing support for go-toml
2
3package toml
4
5import (
6	"testing"
7)
8
9func TestPositionString(t *testing.T) {
10	p := Position{123, 456}
11	expected := "(123, 456)"
12	value := p.String()
13
14	if value != expected {
15		t.Errorf("Expected %v, got %v instead", expected, value)
16	}
17}
18
19func TestInvalid(t *testing.T) {
20	for i, v := range []Position{
21		{0, 1234},
22		{1234, 0},
23		{0, 0},
24	} {
25		if !v.Invalid() {
26			t.Errorf("Position at %v is valid: %v", i, v)
27		}
28	}
29}
30