Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(lint): fixes a lint issue in bitvec-test #3306

Merged
merged 3 commits into from
Jun 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/scale/bitvec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestBitVec(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt := tt
t.Parallel()
resultBytes, err := common.HexToBytes(tt.in)
require.NoError(t, err)
Expand Down Expand Up @@ -74,7 +75,7 @@ func TestBitVecBytes(t *testing.T) {
{
name: "empty_bitvec",
in: NewBitVec(nil),
want: []byte(nil),
want: []byte{},
wantErr: false,
},
{
Expand All @@ -98,6 +99,7 @@ func TestBitVecBytes(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt := tt
t.Parallel()
require.Equal(t, tt.want, tt.in.Bytes())
})
Expand Down Expand Up @@ -139,6 +141,7 @@ func TestBitVecBytesToBits(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt := tt
t.Parallel()
require.Equal(t, tt.want, bytesToBits(tt.in, uint(len(tt.in)*byteSize)))
})
Expand Down Expand Up @@ -179,6 +182,7 @@ func TestBitVecBitsToBytes(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt := tt
t.Parallel()
require.Equal(t, tt.want, bitsToBytes(tt.in))
})
Expand Down