Commit d3f36dbf authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

sync/atomic: add Swap to nil deref test

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12870043
parent 66c58cea
......@@ -1466,6 +1466,12 @@ func TestNilDeref(t *testing.T) {
func() { CompareAndSwapUint64(nil, 0, 0) },
func() { CompareAndSwapUintptr(nil, 0, 0) },
func() { CompareAndSwapPointer(nil, nil, nil) },
func() { SwapInt32(nil, 0) },
func() { SwapUint32(nil, 0) },
func() { SwapInt64(nil, 0) },
func() { SwapUint64(nil, 0) },
func() { SwapUintptr(nil, 0) },
func() { SwapPointer(nil, nil) },
func() { AddInt32(nil, 0) },
func() { AddUint32(nil, 0) },
func() { AddInt64(nil, 0) },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment