MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / Test_reverseBits

Function Test_reverseBits

reverse_bits_190/solution_test.go:8–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func Test_reverseBits(t *testing.T) {
9 type args struct {
10 num uint32
11 }
12 tests := []struct {
13 name string
14 args args
15 want uint32
16 }{
17 {
18 name: "reverse bits",
19 args: args{
20 num: 43261596,
21 },
22 want: 964176192,
23 },
24 {
25 name: "reverse bits",
26 args: args{
27 num: 4294967293,
28 },
29 want: 3221225471,
30 },
31 }
32 for _, tt := range tests {
33 t.Run(tt.name, func(t *testing.T) {
34 assert.Equal(t, tt.want, reverseBits(tt.args.num))
35 })
36 }
37}

Callers

nothing calls this directly

Calls 1

reverseBitsFunction · 0.85

Tested by

no test coverage detected