feat: parallelize tests +ci

This commit is contained in:
Adrien Marquès 2019-05-04 10:11:47 +02:00
parent bf3e651c2c
commit 21f48a65ee
4 changed files with 28 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import (
)
func TestSimple(t *testing.T) {
t.Parallel()
test := struct {
Input []byte
Boundary string
@ -72,6 +74,7 @@ facebook.com
}
func TestSimpleWithCRLF(t *testing.T) {
t.Parallel()
type tcase struct {
Input []byte
@ -156,6 +159,8 @@ facebook.com
}
func TestNoName(t *testing.T) {
t.Parallel()
tests := []struct {
Input []byte
Boundary string
@ -198,6 +203,8 @@ func TestNoName(t *testing.T) {
}
func TestNoHeader(t *testing.T) {
t.Parallel()
tests := []struct {
Input []byte
Boundary string
@ -236,6 +243,8 @@ func TestNoHeader(t *testing.T) {
}
func TestNameConflict(t *testing.T) {
t.Parallel()
test := struct {
Input []byte
Boundary string
@ -266,6 +275,8 @@ facebook.com
}
func TestGetterNil(t *testing.T) {
t.Parallel()
test := struct {
Input []byte
Boundary string

View File

@ -7,6 +7,8 @@ import (
)
func TestAny_New(t *testing.T) {
t.Parallel()
inst := interface{}(builtin.NewAny())
switch cast := inst.(type) {
@ -18,6 +20,7 @@ func TestAny_New(t *testing.T) {
}
func TestAny_AvailableTypes(t *testing.T) {
t.Parallel()
inst := builtin.NewAny()
@ -52,6 +55,8 @@ func TestAny_AvailableTypes(t *testing.T) {
}
func TestAny_AlwaysTrue(t *testing.T) {
t.Parallel()
const typeName = "any"
checker := builtin.NewAny().Checker(typeName)

View File

@ -8,6 +8,8 @@ import (
)
func TestInt_New(t *testing.T) {
t.Parallel()
inst := interface{}(builtin.NewInt())
switch cast := inst.(type) {
@ -19,6 +21,7 @@ func TestInt_New(t *testing.T) {
}
func TestInt_AvailableTypes(t *testing.T) {
t.Parallel()
inst := builtin.NewInt()
@ -52,6 +55,8 @@ func TestInt_AvailableTypes(t *testing.T) {
}
func TestInt_Values(t *testing.T) {
t.Parallel()
const typeName = "int"
checker := builtin.NewInt().Checker(typeName)

View File

@ -7,6 +7,8 @@ import (
)
func TestString_New(t *testing.T) {
t.Parallel()
inst := interface{}(builtin.NewString())
switch cast := inst.(type) {
@ -18,6 +20,7 @@ func TestString_New(t *testing.T) {
}
func TestString_AvailableTypes(t *testing.T) {
t.Parallel()
inst := builtin.NewString()
@ -66,6 +69,8 @@ func TestString_AvailableTypes(t *testing.T) {
}
func TestString_AnyLength(t *testing.T) {
t.Parallel()
const typeName = "string"
checker := builtin.NewString().Checker(typeName)
@ -102,6 +107,7 @@ func TestString_AnyLength(t *testing.T) {
}
func TestString_FixedLength(t *testing.T) {
t.Parallel()
tests := []struct {
Type string
@ -145,6 +151,7 @@ func TestString_FixedLength(t *testing.T) {
}
func TestString_VariableLength(t *testing.T) {
t.Parallel()
tests := []struct {
Type string