Skip to content

Commit

Permalink
Tidy up use of quicktest
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Jul 23, 2024
1 parent 02fe1a9 commit 7913465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func TestCompletedPieceWrongSize(t *testing.T) {
assert.True(t, new)
r := tt.NewReader()
defer r.Close()
quicktest.Check(t, iotest.TestReader(r, []byte(testutil.GreetingFileContents)), quicktest.IsNil)
qt.Check(t, iotest.TestReader(r, []byte(testutil.GreetingFileContents)), qt.IsNil)
}

func BenchmarkAddLargeTorrent(b *testing.B) {
Expand Down
6 changes: 3 additions & 3 deletions test/leecher-storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing/iotest"

"github.com/anacrolix/missinggo/v2/bitmap"
"github.com/frankban/quicktest"
qt "github.com/frankban/quicktest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/time/rate"
Expand Down Expand Up @@ -97,7 +97,7 @@ func testClientTransfer(t *testing.T, ps testClientTransferParams) {
newGOMAXPROCS = ps.GOMAXPROCS
}
defer func() {
quicktest.Check(t, runtime.GOMAXPROCS(prevGOMAXPROCS), quicktest.ContentEquals, newGOMAXPROCS)
qt.Check(t, runtime.GOMAXPROCS(prevGOMAXPROCS), qt.ContentEquals, newGOMAXPROCS)
}()

greetingTempDir, mi := testutil.GreetingTestTorrent()
Expand Down Expand Up @@ -251,5 +251,5 @@ func assertReadAllGreeting(t *testing.T, r io.ReadSeeker) {
pos, err := r.Seek(0, io.SeekStart)
assert.NoError(t, err)
assert.EqualValues(t, 0, pos)
quicktest.Check(t, iotest.TestReader(r, []byte(testutil.GreetingFileContents)), quicktest.IsNil)
qt.Check(t, iotest.TestReader(r, []byte(testutil.GreetingFileContents)), qt.IsNil)
}

0 comments on commit 7913465

Please sign in to comment.