func checkTryConsume(t *testing.T, p *Parser, tType, want string, expectSuccess bool) {
	got, err := p.consume(tType)
	if err != nil && expectSuccess {
		t.Error(err)
		return
	}
	if got != want {
		t.Errorf("Bad token, want: %v, got: %v", want, got)
	}
}
checkTryConsume checks the result of an attempted consume call
package liquid
import "testing"
func checkConsume(t *testing.T, p *Parser, tType, want string) {
	got, err := p.consume(tType)
	if err != nil {
		t.Error(err)
		return
	}
	if got != want {
		t.Errorf("Bad token, want: %v, got: %v", want, got)
	}
}
func TestConsume(t *testing.T) {
	p, err := NewParser("wat: 7")
	if err != nil {
		t.Error(err)
		return
	}
	checkConsume(t, p, tIdentifier, "wat")
	checkConsume(t, p, tColon, ":")
	checkConsume(t, p, tNumberLiteral, "7")
}
func TestJump(t *testing.T) {
	p, err := NewParser("wat: 7")
	if err != nil {
		t.Error(err)
		return
	}
	p.jump(2)
	checkConsume(t, p, tNumberLiteral, "7")
}