aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/reflect/all_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/reflect/all_test.go')
-rw-r--r--libgo/go/reflect/all_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libgo/go/reflect/all_test.go b/libgo/go/reflect/all_test.go
index 33d02ae..e5ec052 100644
--- a/libgo/go/reflect/all_test.go
+++ b/libgo/go/reflect/all_test.go
@@ -789,6 +789,11 @@ var loop1, loop2 Loop
var loopy1, loopy2 Loopy
var cycleMap1, cycleMap2, cycleMap3 map[string]interface{}
+type structWithSelfPtr struct {
+ p *structWithSelfPtr
+ s string
+}
+
func init() {
loop1 = &loop2
loop2 = &loop1
@@ -845,6 +850,7 @@ var deepEqualTests = []DeepEqualTest{
{[]float64{math.NaN()}, self{}, true},
{map[float64]float64{math.NaN(): 1}, map[float64]float64{1: 2}, false},
{map[float64]float64{math.NaN(): 1}, self{}, true},
+ {&structWithSelfPtr{p: &structWithSelfPtr{s: "a"}}, &structWithSelfPtr{p: &structWithSelfPtr{s: "b"}}, false},
// Nil vs empty: not the same.
{[]int{}, []int(nil), false},