GoCollections/lang/atomic/Array_test.go
2022-12-03 19:13:29 +08:00

22 lines
408 B
Go

package atomic
import (
"fmt"
"reflect"
"testing"
"github.com/tursom/GoCollections/encoding/hex"
"github.com/tursom/GoCollections/lang"
)
func TestNewInt32Array_SetBit(t *testing.T) {
fmt.Println(reflect.TypeOf(lang.Nil[atomizerImpl[int]]()).Align())
array := NewInt32Array(16)
for i := 0; i < 16; i++ {
array.SetBit(10*i, true)
}
fmt.Println(array)
fmt.Println(hex.EncodeToString(array))
}