mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 16:01:36 +02:00
refactor: move task, error and testing utils to separte repo; apply gofumpt
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user