feat: parallelize tests +ci
This commit is contained in:
parent
bf3e651c2c
commit
21f48a65ee
|
@ -6,6 +6,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimple(t *testing.T) {
|
func TestSimple(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
test := struct {
|
test := struct {
|
||||||
Input []byte
|
Input []byte
|
||||||
Boundary string
|
Boundary string
|
||||||
|
@ -72,6 +74,7 @@ facebook.com
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSimpleWithCRLF(t *testing.T) {
|
func TestSimpleWithCRLF(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
type tcase struct {
|
type tcase struct {
|
||||||
Input []byte
|
Input []byte
|
||||||
|
@ -156,6 +159,8 @@ facebook.com
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNoName(t *testing.T) {
|
func TestNoName(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
Input []byte
|
Input []byte
|
||||||
Boundary string
|
Boundary string
|
||||||
|
@ -198,6 +203,8 @@ func TestNoName(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNoHeader(t *testing.T) {
|
func TestNoHeader(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
Input []byte
|
Input []byte
|
||||||
Boundary string
|
Boundary string
|
||||||
|
@ -236,6 +243,8 @@ func TestNoHeader(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNameConflict(t *testing.T) {
|
func TestNameConflict(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
test := struct {
|
test := struct {
|
||||||
Input []byte
|
Input []byte
|
||||||
Boundary string
|
Boundary string
|
||||||
|
@ -266,6 +275,8 @@ facebook.com
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetterNil(t *testing.T) {
|
func TestGetterNil(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
test := struct {
|
test := struct {
|
||||||
Input []byte
|
Input []byte
|
||||||
Boundary string
|
Boundary string
|
||||||
|
|
|
@ -7,6 +7,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAny_New(t *testing.T) {
|
func TestAny_New(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
inst := interface{}(builtin.NewAny())
|
inst := interface{}(builtin.NewAny())
|
||||||
|
|
||||||
switch cast := inst.(type) {
|
switch cast := inst.(type) {
|
||||||
|
@ -18,6 +20,7 @@ func TestAny_New(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAny_AvailableTypes(t *testing.T) {
|
func TestAny_AvailableTypes(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
inst := builtin.NewAny()
|
inst := builtin.NewAny()
|
||||||
|
|
||||||
|
@ -52,6 +55,8 @@ func TestAny_AvailableTypes(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAny_AlwaysTrue(t *testing.T) {
|
func TestAny_AlwaysTrue(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
const typeName = "any"
|
const typeName = "any"
|
||||||
|
|
||||||
checker := builtin.NewAny().Checker(typeName)
|
checker := builtin.NewAny().Checker(typeName)
|
||||||
|
|
|
@ -8,6 +8,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestInt_New(t *testing.T) {
|
func TestInt_New(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
inst := interface{}(builtin.NewInt())
|
inst := interface{}(builtin.NewInt())
|
||||||
|
|
||||||
switch cast := inst.(type) {
|
switch cast := inst.(type) {
|
||||||
|
@ -19,6 +21,7 @@ func TestInt_New(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInt_AvailableTypes(t *testing.T) {
|
func TestInt_AvailableTypes(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
inst := builtin.NewInt()
|
inst := builtin.NewInt()
|
||||||
|
|
||||||
|
@ -52,6 +55,8 @@ func TestInt_AvailableTypes(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInt_Values(t *testing.T) {
|
func TestInt_Values(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
const typeName = "int"
|
const typeName = "int"
|
||||||
|
|
||||||
checker := builtin.NewInt().Checker(typeName)
|
checker := builtin.NewInt().Checker(typeName)
|
||||||
|
|
|
@ -7,6 +7,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestString_New(t *testing.T) {
|
func TestString_New(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
inst := interface{}(builtin.NewString())
|
inst := interface{}(builtin.NewString())
|
||||||
|
|
||||||
switch cast := inst.(type) {
|
switch cast := inst.(type) {
|
||||||
|
@ -18,6 +20,7 @@ func TestString_New(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestString_AvailableTypes(t *testing.T) {
|
func TestString_AvailableTypes(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
inst := builtin.NewString()
|
inst := builtin.NewString()
|
||||||
|
|
||||||
|
@ -66,6 +69,8 @@ func TestString_AvailableTypes(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestString_AnyLength(t *testing.T) {
|
func TestString_AnyLength(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
const typeName = "string"
|
const typeName = "string"
|
||||||
|
|
||||||
checker := builtin.NewString().Checker(typeName)
|
checker := builtin.NewString().Checker(typeName)
|
||||||
|
@ -102,6 +107,7 @@ func TestString_AnyLength(t *testing.T) {
|
||||||
|
|
||||||
}
|
}
|
||||||
func TestString_FixedLength(t *testing.T) {
|
func TestString_FixedLength(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
Type string
|
Type string
|
||||||
|
@ -145,6 +151,7 @@ func TestString_FixedLength(t *testing.T) {
|
||||||
|
|
||||||
}
|
}
|
||||||
func TestString_VariableLength(t *testing.T) {
|
func TestString_VariableLength(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
Type string
|
Type string
|
||||||
|
|
Loading…
Reference in New Issue