summaryrefslogtreecommitdiffstats
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.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgo/go/reflect/all_test.go b/libgo/go/reflect/all_test.go
index 56744a514bc..c35dc26e90d 100644
--- a/libgo/go/reflect/all_test.go
+++ b/libgo/go/reflect/all_test.go
@@ -638,6 +638,7 @@ var (
var deepEqualTests = []DeepEqualTest{
// Equalities
+ {nil, nil, true},
{1, 1, true},
{int32(1), int32(1), true},
{0.5, 0.5, true},
@@ -696,6 +697,10 @@ func TestDeepEqual(t *testing.T) {
}
func TestTypeOf(t *testing.T) {
+ // Special case for nil
+ if typ := TypeOf(nil); typ != nil {
+ t.Errorf("expected nil type for nil value; got %v", typ)
+ }
for _, test := range deepEqualTests {
v := ValueOf(test.a)
if !v.IsValid() {
OpenPOWER on IntegriCloud