]> Cypherpunks repositories - gostls13.git/commit
reflect: add flag tests for MapOf
authorMichael Pratt <mpratt@google.com>
Mon, 24 Jun 2024 21:17:13 +0000 (17:17 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 31 Jul 2024 20:45:55 +0000 (20:45 +0000)
commit7dac9898c3d34378de8f523a77a01bcc86033562
tree84e82f50aeee13f57507f3215b4e4a61901d310c
parent385e963e70aaf54a9d96a2c8c28e0a2df3527028
reflect: add flag tests for MapOf

Add two tests that verify that MapOf sets the map NeedsKeyUpdate and
HashMightPanic flags in the created map. Missing these flags would cause
correctness issues not otherwise caught in the reflect tests.

For #54766.

Change-Id: Icd5f117e0794e7b4d1b70fa94e5afbe97c4543e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/594656
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/reflect/all_test.go