refactor: move task, error and testing utils to separte repo; apply gofumpt

This commit is contained in:
yusing
2025-09-27 13:41:50 +08:00
parent 5043ef778f
commit 6776f20332
203 changed files with 696 additions and 2800 deletions

View File

@@ -5,7 +5,7 @@ import (
"testing"
"time"
. "github.com/yusing/godoxy/internal/utils/testing"
expect "github.com/yusing/goutils/testing"
)
func TestRefCounterAddSub(t *testing.T) {
@@ -19,7 +19,7 @@ func TestRefCounterAddSub(t *testing.T) {
}
wg.Wait()
ExpectEqual(t, int(rc.refCount), 0)
expect.Equal(t, int(rc.refCount), 0)
select {
case <-rc.Zero():
@@ -44,7 +44,7 @@ func TestRefCounterMultipleAddSub(t *testing.T) {
}()
}
wg.Wait()
ExpectEqual(t, int(rc.refCount), numAdds+1)
expect.Equal(t, int(rc.refCount), numAdds+1)
wg.Add(numSubs)
for range numSubs {
@@ -54,7 +54,7 @@ func TestRefCounterMultipleAddSub(t *testing.T) {
}()
}
wg.Wait()
ExpectEqual(t, int(rc.refCount), numAdds+1-numSubs)
expect.Equal(t, int(rc.refCount), numAdds+1-numSubs)
rc.Sub()
select {