diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/binstruct/binstruct_test.go | 3 | ||||
-rw-r--r-- | lib/containers/intervaltree_test.go | 3 | ||||
-rw-r--r-- | lib/diskio/kmp_test.go | 5 | ||||
-rw-r--r-- | lib/textui/log_test.go | 5 | ||||
-rw-r--r-- | lib/textui/text_test.go | 5 |
5 files changed, 16 insertions, 5 deletions
diff --git a/lib/binstruct/binstruct_test.go b/lib/binstruct/binstruct_test.go index 105e790..8780acc 100644 --- a/lib/binstruct/binstruct_test.go +++ b/lib/binstruct/binstruct_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -13,6 +13,7 @@ import ( ) func TestSmoke(t *testing.T) { + t.Parallel() type UUID [16]byte type PhysicalAddr int64 type DevItem struct { diff --git a/lib/containers/intervaltree_test.go b/lib/containers/intervaltree_test.go index 88c3003..45743a2 100644 --- a/lib/containers/intervaltree_test.go +++ b/lib/containers/intervaltree_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -35,6 +35,7 @@ func (ival SimpleInterval) String() string { } func TestIntervalTree(t *testing.T) { + t.Parallel() tree := IntervalTree[NativeOrdered[int], SimpleInterval]{ MinFn: func(ival SimpleInterval) NativeOrdered[int] { return NativeOrdered[int]{ival.Min} }, MaxFn: func(ival SimpleInterval) NativeOrdered[int] { return NativeOrdered[int]{ival.Max} }, diff --git a/lib/diskio/kmp_test.go b/lib/diskio/kmp_test.go index 59b6224..4d4b3be 100644 --- a/lib/diskio/kmp_test.go +++ b/lib/diskio/kmp_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -14,6 +14,7 @@ import ( ) func TestBuildKMPTable(t *testing.T) { + t.Parallel() substr := SliceSequence[int64, byte]([]byte("ababaa")) table, err := buildKMPTable[int64, byte](substr) require.NoError(t, err) @@ -81,6 +82,7 @@ func (re RESeq) Get(i int64) (byte, error) { } func TestKMPWildcard(t *testing.T) { + t.Parallel() type testcase struct { InStr string InSubstr string @@ -111,6 +113,7 @@ func TestKMPWildcard(t *testing.T) { for tcName, tc := range testcases { tc := tc t.Run(tcName, func(t *testing.T) { + t.Parallel() matches, err := IndexAll[int64, byte]( StringSequence[int64](tc.InStr), RESeq(tc.InSubstr)) diff --git a/lib/textui/log_test.go b/lib/textui/log_test.go index 08eb38c..514d96e 100644 --- a/lib/textui/log_test.go +++ b/lib/textui/log_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -20,6 +20,7 @@ func logLineRegexp(inner string) string { } func TestLogFormat(t *testing.T) { + t.Parallel() var out strings.Builder ctx := dlog.WithLogger(context.Background(), textui.NewLogger(&out, dlog.LogLevelTrace)) dlog.Debugf(ctx, "foo %d", 12345) @@ -29,6 +30,7 @@ func TestLogFormat(t *testing.T) { } func TestLogLevel(t *testing.T) { + t.Parallel() var out strings.Builder ctx := dlog.WithLogger(context.Background(), textui.NewLogger(&out, dlog.LogLevelInfo)) dlog.Error(ctx, "Error") @@ -54,6 +56,7 @@ func TestLogLevel(t *testing.T) { } func TestLogField(t *testing.T) { + t.Parallel() var out strings.Builder ctx := dlog.WithLogger(context.Background(), textui.NewLogger(&out, dlog.LogLevelInfo)) ctx = dlog.WithField(ctx, "foo", 12345) diff --git a/lib/textui/text_test.go b/lib/textui/text_test.go index c4b42f6..4b93683 100644 --- a/lib/textui/text_test.go +++ b/lib/textui/text_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -16,12 +16,14 @@ import ( ) func TestFprintf(t *testing.T) { + t.Parallel() var out strings.Builder textui.Fprintf(&out, "%d", 12345) assert.Equal(t, "12,345", out.String()) } func TestHumanized(t *testing.T) { + t.Parallel() assert.Equal(t, "12,345", fmt.Sprint(textui.Humanized(12345))) assert.Equal(t, "12,345 ", fmt.Sprintf("%-8d", textui.Humanized(12345))) @@ -32,6 +34,7 @@ func TestHumanized(t *testing.T) { } func TestPortion(t *testing.T) { + t.Parallel() assert.Equal(t, "100% (0/0)", fmt.Sprint(textui.Portion[int]{})) assert.Equal(t, "0% (1/12,345)", fmt.Sprint(textui.Portion[int]{N: 1, D: 12345})) assert.Equal(t, "100% (0/0)", fmt.Sprint(textui.Portion[btrfsvol.PhysicalAddr]{})) |