Skip to content

Commit 95f9724

Browse files
committed
Use github.com/go-quicktest/qt instead of frankban/quicktest
Done with Claude!
1 parent 8e1d5c1 commit 95f9724

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

go/cpossum/c-possum_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package possumC
22

33
import (
4-
qt "github.com/frankban/quicktest"
4+
qt "github.com/go-quicktest/qt"
55
"testing"
66
)
77

88
func TestNoSuchKey(t *testing.T) {
9-
c := qt.New(t)
10-
c.Check(NoSuchKey, qt.ErrorIs, NoSuchKey)
11-
c.Check(Error{
9+
qt.Check(t, qt.ErrorIs(NoSuchKey, NoSuchKey))
10+
qt.Check(t, qt.ErrorIs(Error{
1211
pec: cErrorEnumNoSuchKey,
1312
displayGoesHere: "some string not in the NoSuchKey global target",
14-
}, qt.ErrorIs, NoSuchKey)
13+
}, NoSuchKey))
1514
}

go/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/anacrolix/chansync v0.5.1
77
github.com/anacrolix/generics v0.0.2
88
github.com/anacrolix/missinggo/v2 v2.7.3
9-
github.com/frankban/quicktest v1.14.6
9+
github.com/go-quicktest/qt v1.101.0
1010
)
1111

1212
require (
@@ -17,6 +17,6 @@ require (
1717
github.com/huandu/xstrings v1.3.2 // indirect
1818
github.com/kr/pretty v0.3.1 // indirect
1919
github.com/kr/text v0.2.0 // indirect
20-
github.com/rogpeppe/go-internal v1.9.0 // indirect
20+
github.com/rogpeppe/go-internal v1.11.0 // indirect
2121
golang.org/x/exp v0.0.0-20220428152302-39d4317da171 // indirect
2222
)

go/go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
3333
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
3434
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
3535
github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
36+
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
37+
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
3638
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
3739
github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
3840
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
@@ -54,6 +56,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
5456
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5557
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
5658
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
59+
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
60+
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
5761
github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8=
5862
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
5963
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=

go/handle_test.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package possum
22

33
import (
4-
qt "github.com/frankban/quicktest"
4+
qt "github.com/go-quicktest/qt"
55
"sync"
66
"testing"
77
)
88

99
func TestHandleDropWhileReading(t *testing.T) {
10-
c := qt.New(t)
1110
dir, err := Open(t.TempDir())
12-
c.Assert(err, qt.IsNil)
11+
qt.Assert(t, qt.IsNil(err))
1312
var wg sync.WaitGroup
1413
wg.Add(2)
1514
b := make([]byte, 420)
@@ -23,17 +22,16 @@ func TestHandleDropWhileReading(t *testing.T) {
2322
dir.Close()
2423
}()
2524
wg.Wait()
26-
c.Check(dir.cHandle.ValueDropped().IsSet(), qt.IsTrue)
25+
qt.Check(t, qt.IsTrue(dir.cHandle.ValueDropped().IsSet()))
2726
}
2827

2928
func TestReadDroppedHandle(t *testing.T) {
30-
c := qt.New(t)
3129
dir, err := Open(t.TempDir())
32-
c.Assert(err, qt.IsNil)
33-
c.Assert(dir.Close(), qt.IsNil)
30+
qt.Assert(t, qt.IsNil(err))
31+
qt.Assert(t, qt.IsNil(dir.Close()))
3432
b := make([]byte, 420)
3533
n, err := dir.SingleReadAt("a", 69, b)
36-
c.Assert(err, qt.ErrorIs, ErrHandleClosed)
37-
c.Check(n, qt.Equals, 0)
38-
c.Check(dir.cHandle.ValueDropped().IsSet(), qt.IsTrue)
34+
qt.Assert(t, qt.ErrorIs(err, ErrHandleClosed))
35+
qt.Check(t, qt.Equals(n, 0))
36+
qt.Check(t, qt.IsTrue(dir.cHandle.ValueDropped().IsSet()))
3937
}

0 commit comments

Comments
 (0)