PennockTech/tabular

Crash in tests on Linux

Closed this issue · 1 comments

Tests pass fine on Darwin, but on Linux, there's a crash inside the https://github.com/liquidgecka/testlib library,

--- FAIL: TestHTMLRowClassGenerator (0.00s)
panic: reflect.Value.Interface: cannot return value obtained from unexported field or method [recovered]
        panic: reflect.Value.Interface: cannot return value obtained from unexported field or method

Why the Golang reflection's implementation varies as to whether it panics, by platform, I don't know.

This inaugural Issue is to track the issue, to get working tests.

goroutine 18 [running]:
panic(0x59cba0, 0xc420138750)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
testing.tRunner.func1(0xc42010c0c0)
        /usr/local/go/src/testing/testing.go:579 +0x25d
panic(0x59cba0, 0xc420138750)
        /usr/local/go/src/runtime/panic.go:458 +0x243
reflect.valueInterface(0x5a8800, 0xc4201286e0, 0x1b3, 0x1, 0xc420124f60, 0xc42010c000)
        /usr/local/go/src/reflect/value.go:918 +0x1be
reflect.Value.Interface(0x5a8800, 0xc4201286e0, 0x1b3, 0x1, 0x2)
        /usr/local/go/src/reflect/value.go:907 +0x44
github.com/liquidgecka/testlib.(*T).deepEqual.func1(0x5ad9a0)
        /home/pdp/go/src/github.com/liquidgecka/testlib/equal.go:215 +0x2ab
github.com/liquidgecka/testlib.(*T).deepEqual(0xc420137f00, 0x588689, 0x11, 0x5a8800, 0xc420128670, 0x1b3, 0x5a8800, 0xc4201286e0, 0x1b3, 0x0, ...)
        /home/pdp/go/src/github.com/liquidgecka/testlib/equal.go:260 +0xd0b
github.com/liquidgecka/testlib.(*T).deepEqual(0xc420137f00, 0x0, 0x0, 0x5d5e60, 0xc420128620, 0x199, 0x5d5e60, 0xc420128690, 0x199, 0x0, ...)
        /home/pdp/go/src/github.com/liquidgecka/testlib/equal.go:351 +0x2c57
github.com/liquidgecka/testlib.(*T).deepEqual(0xc420137f00, 0x0, 0x0, 0x5d3640, 0xc420128620, 0x16, 0x5d3640, 0xc420128690, 0x16, 0x0, ...)
        /home/pdp/go/src/github.com/liquidgecka/testlib/equal.go:301 +0x17dd
github.com/liquidgecka/testlib.(*T).notEqualPrefix_(0xc420137f00, 0x5d3640, 0xc420128620, 0x5d3640, 0xc420128690, 0xc420121710, 0x29)
        /home/pdp/go/src/github.com/liquidgecka/testlib/equal.go:118 +0x264
github.com/liquidgecka/testlib.(*T).NotEqual(0xc420137f00, 0x5d3640, 0xc420128620, 0x5d3640, 0xc420128690, 0xc420137de0, 0x1, 0x1)
        /home/pdp/go/src/github.com/liquidgecka/testlib/equal.go:94 +0x6f
github.com/PennockTech/tabular/html_test.TestHTMLRowClassGenerator(0xc42010c0c0)
        /home/pdp/go/src/github.com/PennockTech/tabular/html/html_test.go:114 +0x6f0
testing.tRunner(0xc42010c0c0, 0x5fcc80)
        /usr/local/go/src/testing/testing.go:610 +0x81
created by testing.(*T).Run
        /usr/local/go/src/testing/testing.go:646 +0x2ec

Platform variance was because I'd encountered the testlib change before, and fixed it locally, but wasn't accepted upstream at the time, and this was forgotten about.