]> Cypherpunks repositories - gostls13.git/commitdiff
maps: enhance the robustness of the tests
authorcuiweixie <cuiweixie@gmail.com>
Fri, 19 May 2023 17:14:32 +0000 (01:14 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 19 May 2023 19:26:57 +0000 (19:26 +0000)
Change-Id: I908e11196f55069d6dca6a19cd206629618e9f37
Reviewed-on: https://go-review.googlesource.com/c/go/+/496079
Auto-Submit: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
src/maps/maps_test.go

index bab884ef350c9db4ecb92d8eee0bfbe82517187b..e7670839c94734c2f065b567b47734961a744db2 100644 (file)
@@ -38,7 +38,7 @@ func TestKeys(t *testing.T) {
        var m = make(map[int]int)
        for i := 0; i < 840; i++ {
                want3 = append(want3, i)
-               m[i] = i
+               m[i] = i * i
        }
 
        got3 := Keys(m)