MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestUint256_Inc

Function TestUint256_Inc

pow/cpuminer/uint256_test.go:53–94  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

51}
52
53func TestUint256_Inc(t *testing.T) {
54 Convey("uint256 inc", t, func() {
55 i := Uint256{}
56 i.Inc()
57 So(i.A, ShouldEqual, 1)
58 So(i.B, ShouldEqual, 0)
59 So(i.C, ShouldEqual, 0)
60 So(i.D, ShouldEqual, 0)
61 })
62 Convey("uint256 inc", t, func() {
63 i := Uint256{math.MaxUint64, 0, 0, 0}
64 i.Inc()
65 So(i.A, ShouldEqual, 0)
66 So(i.B, ShouldEqual, 1)
67 So(i.C, ShouldEqual, 0)
68 So(i.D, ShouldEqual, 0)
69 })
70 Convey("uint256 inc", t, func() {
71 i := Uint256{math.MaxUint64, math.MaxUint64, 0, 0}
72 i.Inc()
73 So(i.A, ShouldEqual, 0)
74 So(i.B, ShouldEqual, 0)
75 So(i.C, ShouldEqual, 1)
76 So(i.D, ShouldEqual, 0)
77 })
78 Convey("uint256 inc", t, func() {
79 i := Uint256{math.MaxUint64, math.MaxUint64, math.MaxUint64, 0}
80 i.Inc()
81 So(i.A, ShouldEqual, 0)
82 So(i.B, ShouldEqual, 0)
83 So(i.C, ShouldEqual, 0)
84 So(i.D, ShouldEqual, 1)
85 })
86 Convey("uint256 inc", t, func() {
87 i := Uint256{math.MaxUint64, math.MaxUint64, math.MaxUint64, math.MaxUint64}
88 i.Inc()
89 So(i.A, ShouldEqual, 0)
90 So(i.B, ShouldEqual, 0)
91 So(i.C, ShouldEqual, 0)
92 So(i.D, ShouldEqual, 0)
93 })
94}

Callers

nothing calls this directly

Calls 1

IncMethod · 0.95

Tested by

no test coverage detected