I have a C library with some test-cases (using googletest) that all pass. I created Go bindings for the C lib and converted the tests to testify format.
Some Go test fails because a return value from the C function (type float) is different than expected. For example: ASSERT_FLOAT_EQ(10, GetHeight(root)); // C code works assert.EqualValues(t, 10, root.Height()) // Go code fails The returned value in Go is: float32(1e+21) instead of float32(10). I'm really wondering how this can happen. It looks like somewhere in the FFI, the value changes. But what puzzles me, I'm using the same Go tests over and over in other tests, and things are working. Does anyone have an idea what could be the problem? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/434e19d2-e692-4806-9c5c-efe7f9e74c59n%40googlegroups.com.