From 56a83c905e47b41640b0a8281d80acd377d958fa Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Sat, 21 Sep 2013 21:50:00 -0500 Subject: Add tests for recent cgo handling updates. This commit adds tests for the recent cgo handling of char, unsigned char, and uint8_t arrays. In addition, it adds an architecture for the cgo specific testing based on build constraints. This was done because spew itself does not require cgo, but in order to test its handling of the cgo types it needs to be fed cgo data. Rather than force all users to have a system which supports cgo and an external compiler just to run the tests, the cgo test support must explicitly be turned on via a build tag. --- spew/dump_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spew/dump_test.go') diff --git a/spew/dump_test.go b/spew/dump_test.go index 3a50650..31b7b6b 100644 --- a/spew/dump_test.go +++ b/spew/dump_test.go @@ -561,7 +561,6 @@ func addMapDumpTests() { addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") addDumpTest(nv4, "(*"+v4t+")()\n") - } func addStructDumpTests() { @@ -884,6 +883,7 @@ func TestDump(t *testing.T) { addCircularDumpTests() addPanicDumpTests() addErrorDumpTests() + addCgoDumpTests() t.Logf("Running %d tests", len(dumpTests)) for i, test := range dumpTests { -- cgit v1.2.3