1
0
mirror of https://github.com/tursom/GoCollections.git synced 2025-04-15 00:00:27 +08:00
GoCollections/lang/atomic/Atomic_test.go
2022-12-03 19:13:29 +08:00

16 lines
218 B
Go

package atomic
import (
"fmt"
"testing"
)
func TestGetAtomizer(t *testing.T) {
atomizer := GetAtomizer[int32]()
var ref *int32
var obj int32 = 1
atomizer.CompareAndSwap()(&ref, nil, &obj)
fmt.Println(*ref)
}