You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: parser_test.go
    path of file: ./repos/manba/pkg/route
    
    the code of the file until where you have to start completion: package route

import (
	"bytes"
	"testing"
)

func TestParseSingle(t *testing.T) {
	input := []byte("/")
	p := newParser(input)
	nodes, err := p.parse()
	if err != nil {
		t.Errorf("parsed failed with error: %+v", err)
		return
	}
	if len(nodes) != 1 {
		t.Errorf("expect 1 nodes but %d", len(nodes))
	}
	if !bytes.Equal(nodes[0].value, []byte("/")) {
		t.Errorf("expect value / at index 0 but %s", nodes[0].value)
	}
	if nodes[0].nt != slashType {
		t.Errorf("expect node type %d at index 0 but %d", slashType, nodes[0].nt)
	}
}

func TestParseConst(t *testing.T) {
	input := []byte("/abc")
	p := newParser(input)
	nodes, err := p.parse()
	if err != nil {
		t.Errorf("parsed failed with error: %+v", err)
		return
	}
	if len(nodes) != 2 {
		t.Errorf("expect 2 nodes but %d", len(nodes))
	}
	if !bytes.Equal(nodes[0].value, []byte("/")) {
		t.Errorf("expect value / at index 0 but %s", nodes[0].value)
	}
	if nodes[0].nt != slashType {
		t.Errorf("expect node type %d at index 0 but %d", slashType, nodes[0].nt)
	}
	if !bytes.Equal(nodes[1].value, []byte("abc")) {
		t.Errorf("expect value abc at index 1 but %s", nodes[1].value)
	}
	if nodes[1].nt != constType {
		t.Errorf("expect node type %d at index 1 but %d", constType, nodes[1].nt)
	}

	input = []byte("/abc/")
	p = newParser(input)
	nodes, err = p.parse()
	if err != nil {
		t.Errorf("parsed failed with error: %+v", err)
		return
	}
	if len(nodes) != 2 {
		t.Errorf("expect 2 nodes but %d", len(nodes))
	}
	if !bytes.Equal(nodes[0].value, []byte("/")) {
		t.Errorf("expect value / at index 0 but %s", nodes[0].value)
	}
	if nodes[0].nt != slashType {
		t.Errorf("expect node type %d at index 0 but %d", slashType, nodes[0].nt)
	}
	if !bytes.Equal(nodes[1].value, []byte("abc")) {
		t.Errorf("expect value abc at index 1 but %s", nodes[1].value)
	}
	if nodes[1].nt != constType {
		t.Errorf("expect node type %d at index 1 but %d", constType, nodes[1].nt)
	}

	input = []byte("/abc/def")
	p = newParser(input)
	nodes, err = p.parse()
	if err != nil {
		t.Errorf("parsed failed with error: %+v", err)
		return
	}
	if len(nodes) != 4 {
		t.Errorf("expect 4 nodes but %d", len(nodes))
	}
	if !bytes.Equal(nodes[0].value
    
func TestParseConst(t *testing.T) {
	input := []byte("/abc")
	p := newParser(input)
	nodes, err := p.parse()
	if err != nil {
		t.Errorf("parsed failed with error: %+v", err)
		return
	}
	if len(nodes) != 2 {
		t.Errorf("expect 2 nodes but %d", len(nodes))
	}
	if !bytes.Equal(nodes[0].value, []byte("/")) {
		t.Errorf("expect value / at index 0 but %s", nodes[0].value)
	}
	if nodes[0].nt != slashType {
		t.Errorf("expect node type %d at index 0 but %d", slashType, nodes[0].nt)
	}
	if !bytes.Equal(nodes[1].value, []byte("abc")) {
		t.Errorf("expect value abc at index 1 but %s", nodes[1].value)
	}
	if nodes[1].nt != constType {
		t.Errorf("expect node type %d at index 1 but %d", constType, nodes[1].nt)
	}

	input = []byte("/abc/")
	p = newParser(input)
	nodes, err = p.parse()
	if err != nil {
		t.Errorf("parsed failed with error: %+v", err)
		return
	}
	if len(nodes) != 2 {
		t.Errorf("expect 2 nodes but %d", len(nodes))
	}
	if !bytes.Equal(nodes[0].value, []byte("/")) {
		t.Errorf("expect value / at index 0 but %s", nodes[0].value)
	}
	if nodes[0].nt != slashType {
		t.Errorf("expect node type %d at index 0 but %d", slashType, nodes[0].nt)
	}
	if !bytes.Equal(nodes[1].value, []byte("abc")) {
		t.Errorf("expect value abc at index 1 but %s", nodes[1].value)
	}
	if nodes[1].nt != constType {
		t.Errorf("expect node type %d at index 1 but %d", constType, nodes[1].nt)
	}

	input = []byte("/abc/def")
	p = newParser(input)
	nodes, err = p.parse()
	if err != nil {
		t.Errorf("parsed failed with error: %+v", err)
		return
	}
	if len(nodes) != 4 {
		t.Errorf("expect 4 nodes but %d", len(nodes))
	}
	if !bytes.Equal(nodes[0].value, []byte("/")) {
		t.Errorf("expect value / at index 0 but %s", nodes[0].value)
	}
	if nodes[0].nt != slashType {
		t.Errorf("expect node type %d at index 0 but %d", slashType, nodes[0].nt)
	}
	if !bytes.Equal(nodes[1].value, []byte("abc")) {
		t.Errorf("expect value abc at index 1 but %s", nodes[1].value)
	}
	if nodes[1].nt != constType {
		t.Errorf("expect node type %d at index 1 but %d", constType, nodes[1].nt)
	}
	if !bytes.Equal(nodes[2].value, []byte("/")) {
		t.Errorf("expect value / at index 2 but %s", nodes[2].value)
	}
	if nodes[2].nt != slashType {
		t.Errorf("expect node type %d at index 2 but %d", slashType, nodes[2].nt)
	}
	if !bytes.Equal(nodes[3].value, []byte("def")) {
		t.Errorf("expect value abc at index 3 but %s", nodes[3].value)
	}
	if nodes[3].nt != constType {
		t.Errorf("expect node type %d at index 3 but %d", constType, nodes[3].nt)
	}
}