mirror of
https://github.com/tursom/GoCollections.git
synced 2025-03-13 17:00:18 +08:00
16 lines
218 B
Go
16 lines
218 B
Go
package atomic
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/tursom/GoCollections/lang"
|
|
"testing"
|
|
)
|
|
|
|
func TestAtomic_Store(t *testing.T) {
|
|
a := &Reference[lang.Int]{}
|
|
var i lang.Int = 1
|
|
a.Store(&i)
|
|
i = 2
|
|
fmt.Println(a.Load())
|
|
}
|