瀏覽代碼

add test for nil TestMarshaler

Roger Peppe 8 年之前
父節點
當前提交
ab5d55c35f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      encode_test.go

+ 3 - 0
encode_test.go

@@ -24,6 +24,9 @@ var marshalTests = []struct {
 	{
 		nil,
 		"null\n",
+	}, {
+		(*marshalerType)(nil),
+		"null\n",
 	}, {
 		&struct{}{},
 		"{}\n",