mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 10:37:46 +00:00
src/reflect: add test for indirect pointer fix
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package reflect_test
|
||||
|
||||
import (
|
||||
. "reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIndirectPointers(t *testing.T) {
|
||||
var m = map[string]int{}
|
||||
m["x"] = 1
|
||||
|
||||
var a = &m
|
||||
|
||||
if ValueOf(a).Elem().Len() != 1 {
|
||||
t.Errorf("bad map length via reflect")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user