(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func 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 | } |
nothing calls this directly
no test coverage detected