浏览代码

Add dump test for max depth option.

Dave Collins 13 年之前
父节点
当前提交
cddf8663bd
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      spew/spew_test.go

+ 5 - 0
spew/spew_test.go

@@ -152,6 +152,11 @@ func initSpewTests() {
 		{scsNoPmethods, fCSFprint, "", tps, "test"},
 		{scsNoPmethods, fCSFprint, "", &tps, "<*>stringer test"},
 		{scsMaxDepth, fCSFprint, "", dt, "{{<max>} [<max>] [<max>] map[<max>]}"},
+		{scsMaxDepth, fCSFdump, "", dt, "(spew_test.depthTester) {\n" +
+			" ic: (spew_test.indirCir1) {\n  <max depth reached>\n },\n" +
+			" arr: ([1]string) {\n  <max depth reached>\n },\n" +
+			" slice: ([]string) {\n  <max depth reached>\n },\n" +
+			" m: (map[string]int) {\n  <max depth reached>\n }\n}\n"},
 	}
 }