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: parsers_test.go
    path of file: ./repos/beego/server/web/context/param
    
    the code of the file until where you have to start completion: package param

import (
	"reflect"
	"testing"
	"time"
)

type testDefinition struct {
	strValue       string
	expectedValue  interface{}
	expectedParser paramParser
}

func Test_Parsers(t *testing.T) {
	// ints
	checkParser(testDefinition{"1", 1, intParser{}}, t)
	checkParser(testDefinition{"-1", int64(-1), intParser{}}, t)
	checkParser(testDefinition{"1", uint64(1), intParser{}}, t)

	// floats
	checkParser(testDefinition{"1.0", float32(1.0), floatParser{}}, t)
	checkParser(testDefinition{"-
    
func checkParser(def testDefinition, t *testing.T, methodParam ...MethodParam) {
	toType := reflect.TypeOf(def.expectedValue)
	var mp MethodParam
	if len(methodParam) == 0 {
		mp = MethodParam{}
	} else {
		mp = methodParam[0]
	}
	parser := getParser(&mp, toType)

	if reflect.TypeOf(parser) != reflect.TypeOf(def.expectedParser) {
		t.Errorf("Invalid parser for value %v. Expected: %v, actual: %v", def.strValue, reflect.TypeOf(def.expectedParser).Name(), reflect.TypeOf(parser).Name())
		return
	}
	result, err := parser.parse(def.strValue, toType)
	if err != nil {
		t.Errorf("Parsing error for value %v. Expected result: %v, error: %v", def.strValue, def.expectedValue, err)
		return
	}
	convResult, err := safeConvert(reflect.ValueOf(result), toType)
	if err != nil {
		t.Errorf("Conversion error for %v. from value: %v, toType: %v, error: %v", def.strValue, result, toType, err)
		return
	}
	if !reflect.DeepEqual(convResult.Interface(), def.expectedValue) {
		t.Errorf("Parsing error for value %v. Expected result: %v, actual: %v", def.strValue, def.expectedValue, result)
	}
}