mirror of
https://github.com/tursom/GoCollections.git
synced 2025-03-22 16:00:06 +08:00
22 lines
408 B
Go
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))
|
|
}
|