summaryrefslogtreecommitdiff
path: root/spew/dump_test.go
diff options
context:
space:
mode:
authorDave Collins <[email protected]>2013-09-21 21:50:00 -0500
committerDave Collins <[email protected]>2013-09-21 21:50:00 -0500
commit56a83c905e47b41640b0a8281d80acd377d958fa (patch)
tree8de4c943cb1e7c370a90fddecae8044861b5abef /spew/dump_test.go
parenta83f71796b50ca8b7a1839954fd122d52749dcfa (diff)
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.
Diffstat (limited to 'spew/dump_test.go')
-rw-r--r--spew/dump_test.go2
1 files changed, 1 insertions, 1 deletions
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+")(<nil>)\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 {