aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/race/testdata
diff options
context:
space:
mode:
authorChressie Himpel <chressie@google.com>2022-02-03 19:10:54 +0100
committerChressie Himpel <chressie@google.com>2022-02-03 19:30:02 +0100
commite14fee553a4646d15123caa04f7ca6ddb7b48362 (patch)
tree26086b9981918546f946d12547d097eb0974cc2e /src/runtime/race/testdata
parentd382493a20cf005c6631032ebb410a7c2bc768eb (diff)
parent8384fe86a5b7f579a50c7ad423d4dd4eb2d1f117 (diff)
downloadgo-e14fee553a4646d15123caa04f7ca6ddb7b48362.tar.xz
[dev.boringcrypto] all: merge master into dev.boringcrypto
Change-Id: I18dbf4f9fa7e2334fccedd862a523126cf38164e
Diffstat (limited to 'src/runtime/race/testdata')
-rw-r--r--src/runtime/race/testdata/issue12664_test.go2
-rw-r--r--src/runtime/race/testdata/mop_test.go18
-rw-r--r--src/runtime/race/testdata/pool_test.go4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/runtime/race/testdata/issue12664_test.go b/src/runtime/race/testdata/issue12664_test.go
index c9f790edc8..714e83d318 100644
--- a/src/runtime/race/testdata/issue12664_test.go
+++ b/src/runtime/race/testdata/issue12664_test.go
@@ -56,7 +56,7 @@ func TestRaceIssue12664_3(t *testing.T) {
close(c)
}()
var r MyT
- var i interface{} = r
+ var i any = r
issue12664_3 = i.(MyT)
<-c
}
diff --git a/src/runtime/race/testdata/mop_test.go b/src/runtime/race/testdata/mop_test.go
index b60cabfe86..94b6e58de0 100644
--- a/src/runtime/race/testdata/mop_test.go
+++ b/src/runtime/race/testdata/mop_test.go
@@ -255,7 +255,7 @@ func TestRaceCaseIssue6418(t *testing.T) {
func TestRaceCaseType(t *testing.T) {
var x, y int
- var i interface{} = x
+ var i any = x
c := make(chan int, 1)
go func() {
switch i.(type) {
@@ -270,7 +270,7 @@ func TestRaceCaseType(t *testing.T) {
func TestRaceCaseTypeBody(t *testing.T) {
var x, y int
- var i interface{} = &x
+ var i any = &x
c := make(chan int, 1)
go func() {
switch i := i.(type) {
@@ -288,8 +288,8 @@ func TestRaceCaseTypeIssue5890(t *testing.T) {
// spurious extra instrumentation of the initial interface
// value.
var x, y int
- m := make(map[int]map[int]interface{})
- m[0] = make(map[int]interface{})
+ m := make(map[int]map[int]any)
+ m[0] = make(map[int]any)
c := make(chan int, 1)
go func() {
switch i := m[0][1].(type) {
@@ -758,7 +758,7 @@ func TestRaceStructFieldRW3(t *testing.T) {
}
func TestRaceEfaceWW(t *testing.T) {
- var a, b interface{}
+ var a, b any
ch := make(chan bool, 1)
go func() {
a = 1
@@ -810,7 +810,7 @@ func TestRaceEfaceConv(t *testing.T) {
c := make(chan bool)
v := 0
go func() {
- go func(x interface{}) {
+ go func(x any) {
}(v)
c <- true
}()
@@ -1127,7 +1127,7 @@ func TestRaceRune(t *testing.T) {
func TestRaceEmptyInterface1(t *testing.T) {
c := make(chan bool)
- var x interface{}
+ var x any
go func() {
x = nil
c <- true
@@ -1138,7 +1138,7 @@ func TestRaceEmptyInterface1(t *testing.T) {
func TestRaceEmptyInterface2(t *testing.T) {
c := make(chan bool)
- var x interface{}
+ var x any
go func() {
x = &Point{}
c <- true
@@ -1579,7 +1579,7 @@ func TestRaceAddrExpr(t *testing.T) {
func TestRaceTypeAssert(t *testing.T) {
c := make(chan bool, 1)
x := 0
- var i interface{} = x
+ var i any = x
go func() {
y := 0
i = y
diff --git a/src/runtime/race/testdata/pool_test.go b/src/runtime/race/testdata/pool_test.go
index 161f4b7c23..a96913e381 100644
--- a/src/runtime/race/testdata/pool_test.go
+++ b/src/runtime/race/testdata/pool_test.go
@@ -15,7 +15,7 @@ func TestRacePool(t *testing.T) {
// Repeat so that at least one iteration gets reuse.
for i := 0; i < 10; i++ {
c := make(chan int)
- p := &sync.Pool{New: func() interface{} { return make([]byte, 10) }}
+ p := &sync.Pool{New: func() any { return make([]byte, 10) }}
x := p.Get().([]byte)
x[0] = 1
p.Put(x)
@@ -31,7 +31,7 @@ func TestRacePool(t *testing.T) {
func TestNoRacePool(t *testing.T) {
for i := 0; i < 10; i++ {
- p := &sync.Pool{New: func() interface{} { return make([]byte, 10) }}
+ p := &sync.Pool{New: func() any { return make([]byte, 10) }}
x := p.Get().([]byte)
x[0] = 1
p.Put(x)