1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
9 "google3/spam/archer/frontend/deepequal"
12 func TestTwoNilValues(t *testing.T) {
13 if err := deepequal.Check(nil, nil); err != nil {
14 t.Errorf("expected nil, saw %v", err)
29 entries map[int]interface{}
34 return &Foo{bar: &Bar{baz: &Baz{
35 entries: map[int]interface{}{
38 11: &Baz{whatever: "it's just a test"}}}},
39 bang: &Bar{foo: []*Foo{
40 &Foo{bar: &Bar{baz: &Baz{
41 entries: map[int]interface{}{
44 13: &Baz{whatever: "this is nuts"}}}},
45 bang: &Bar{foo: []*Foo{
46 &Foo{bar: &Bar{baz: &Baz{
47 entries: map[int]interface{}{
50 11: &Baz{whatever: "no, it's Go"}}}},
51 bang: &Bar{foo: []*Foo{
52 &Foo{bar: &Bar{baz: &Baz{
53 entries: map[int]interface{}{
56 -11: &Baz{whatever: "we need to go deeper"}}}},
57 bang: &Bar{foo: []*Foo{
58 &Foo{bar: &Bar{baz: &Baz{
59 entries: map[int]interface{}{
62 -7: &Baz{whatever: "are you serious?"}}}},
63 bang: &Bar{foo: []*Foo{}}},
64 &Foo{bar: &Bar{baz: &Baz{
65 entries: map[int]interface{}{
68 20: &Baz{whatever: "na, not really ..."}}}},
69 bang: &Bar{foo: []*Foo{}}}}}}}}},
70 &Foo{bar: &Bar{baz: &Baz{
71 entries: map[int]interface{}{
74 -1: &Baz{whatever: "... it's just a test."}}}},
75 bang: &Bar{foo: []*Foo{}}}}}}}}}
78 func TestElaborate(t *testing.T) {
82 if err := deepequal.Check(a, b); err != nil {
83 t.Errorf("expected nil, saw %v", err)