1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

test: add parallel running for all unit test functions

This commit is contained in:
dudaodong
2023-06-29 14:49:28 +08:00
parent 17ff84fa1f
commit ab364744b6
33 changed files with 541 additions and 46 deletions

View File

@@ -7,6 +7,8 @@ import (
)
func TestDecimalBytes(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestDecimalBytes")
assert.Equal("1KB", DecimalBytes(1000))
@@ -21,6 +23,8 @@ func TestDecimalBytes(t *testing.T) {
}
func TestBinaryBytes(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestBinaryBytes")
assert.Equal("1KiB", BinaryBytes(1024))
@@ -30,6 +34,8 @@ func TestBinaryBytes(t *testing.T) {
}
func TestParseDecimalBytes(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestParseDecimalBytes")
cases := map[string]uint64{
@@ -58,6 +64,8 @@ func TestParseDecimalBytes(t *testing.T) {
}
func TestParseBinaryBytes(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestParseBinaryBytes")
cases := map[string]uint64{

View File

@@ -8,6 +8,8 @@ import (
)
func TestComma(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestComma")
assert.Equal("", Comma("", ""))
@@ -29,6 +31,8 @@ func TestComma(t *testing.T) {
}
func TestPretty(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestPretty")
cases := []any{
@@ -60,6 +64,8 @@ func TestPretty(t *testing.T) {
}
func TestPrettyToWriter(t *testing.T) {
t.Parallel()
assert := internal.NewAssert(t, "TestPrettyToWriter")
type User struct {