Skip to content

Commit

Permalink
gorond test files
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed May 12, 2023
1 parent 0b62090 commit 044be48
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 31 deletions.
1 change: 1 addition & 0 deletions bencode/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"testing"

"github.com/anacrolix/dht/v2/krpc"

"github.com/anacrolix/torrent/bencode"
)

Expand Down
5 changes: 3 additions & 2 deletions client-nowasm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import (
"os"
"testing"

"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/storage"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/storage"
)

func TestBoltPieceCompletionClosedWhenClientClosed(t *testing.T) {
Expand Down
10 changes: 4 additions & 6 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ import (
"testing/iotest"
"time"

"github.com/frankban/quicktest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/anacrolix/log"

"github.com/anacrolix/dht/v2"
"github.com/anacrolix/log"
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/missinggo/v2/filecache"
"github.com/frankban/quicktest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/internal/testutil"
Expand Down
3 changes: 1 addition & 2 deletions internal/nestedmaps/nestedmaps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package nestedmaps
import (
"testing"

qt "github.com/frankban/quicktest"

g "github.com/anacrolix/generics"
qt "github.com/frankban/quicktest"
)

func TestNestedMaps(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"testing"

"github.com/anacrolix/log"

"github.com/anacrolix/missinggo/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion peer_protocol/pex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"net"
"testing"

"github.com/anacrolix/dht/v2/krpc"
"github.com/stretchr/testify/require"

"github.com/anacrolix/dht/v2/krpc"
"github.com/anacrolix/torrent/bencode"
)

Expand Down
3 changes: 1 addition & 2 deletions peerconn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ import (
"sync"
"testing"

"golang.org/x/time/rate"

"github.com/frankban/quicktest"
qt "github.com/frankban/quicktest"
"github.com/stretchr/testify/require"
"golang.org/x/time/rate"

"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
Expand Down
2 changes: 1 addition & 1 deletion pex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"net"
"testing"

"github.com/anacrolix/dht/v2/krpc"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/anacrolix/dht/v2/krpc"
pp "github.com/anacrolix/torrent/peer_protocol"
)

Expand Down
3 changes: 2 additions & 1 deletion requesting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package torrent
import (
"testing"

pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/bradfitz/iter"
qt "github.com/frankban/quicktest"

pp "github.com/anacrolix/torrent/peer_protocol"
)

func keysAsSlice(m map[Request]struct{}) (sl []Request) {
Expand Down
1 change: 0 additions & 1 deletion reuse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"testing"

"github.com/anacrolix/log"

qt "github.com/frankban/quicktest"
)

Expand Down
3 changes: 2 additions & 1 deletion storage/safe-path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"path/filepath"
"testing"

"github.com/anacrolix/torrent/metainfo"
qt "github.com/frankban/quicktest"

"github.com/anacrolix/torrent/metainfo"
)

func init() {
Expand Down
5 changes: 3 additions & 2 deletions storage/sqlite/sqlite-storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ import (

_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/squirrel"
"github.com/dustin/go-humanize"
qt "github.com/frankban/quicktest"

"github.com/anacrolix/torrent/storage"
test_storage "github.com/anacrolix/torrent/storage/test"
"github.com/anacrolix/torrent/test"
"github.com/dustin/go-humanize"
qt "github.com/frankban/quicktest"
)

func TestLeecherStorage(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions test/issue377_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ import (
"testing/iotest"

"github.com/anacrolix/log"
pp "github.com/anacrolix/torrent/peer_protocol"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/storage"
)

Expand Down
10 changes: 5 additions & 5 deletions test/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import (
"time"

"github.com/anacrolix/missinggo/v2/filecache"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/storage"
qt "github.com/frankban/quicktest"
"golang.org/x/time/rate"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/time/rate"

"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/storage"
)

type fileCacheClientStorageFactoryParams struct {
Expand Down
5 changes: 3 additions & 2 deletions tracker/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"net/url"
"testing"

"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/tracker/udp"
qt "github.com/frankban/quicktest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/tracker/udp"
)

func TestUnmarshalHTTPResponsePeerDicts(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions tracker/udp-server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/anacrolix/dht/v2/krpc"
"github.com/anacrolix/missinggo/v2"

"github.com/anacrolix/torrent/tracker/udp"
)

Expand Down
3 changes: 2 additions & 1 deletion tracker/udp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import (

"github.com/anacrolix/dht/v2/krpc"
_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/torrent/tracker/udp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/anacrolix/torrent/tracker/udp"
)

var trackers = []string{
Expand Down
1 change: 0 additions & 1 deletion utp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"testing"

"github.com/anacrolix/log"

"github.com/stretchr/testify/assert"
)

Expand Down

0 comments on commit 044be48

Please sign in to comment.