Forums

Full Version: serialization test failure
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
[-------------- RUNNING UNIT TESTS --------------]
src/joeserialize.cpp(638): 'serialization_high_level_object_read_write_test' FAILED: value1 () should equal value2 (data/)
Results: 34 succeeded, 1 failed
[-------------- UNIT TESTS FINISHED -------------]
This didn't happen previously, so I would guess it is a recent regression.
Unable to repro. Is it possible you don't have permission to write to test.txt in the folder where you're running vdrift -test from?
I am still getting this from svn r3007 (data r779):
Code:
[-------------- RUNNING UNIT TESTS --------------]
src/joeserialize.cpp(639): 'serialization_high_level_object_read_write_test' FAILED: value1 () should equal value2 (data/)
Results: 34 succeeded, 1 failed
[-------------- UNIT TESTS FINISHED -------------]
Not sure why. I am able to write files in the current directory. Running build/vdrift-test from the source tree root.

Hmmm...however, when I run
Code:
build/vdrift -test
I get a different result. All the tests pass. Clearly there are differences, I'm guessing that there is some setup/init that needs to happen before JOESERIALIZE works properly? The unittest.cpp main() doesn't do any of that. Thoughts?
No, there's no initialization required.
So after a lot of investigation over chat, Joe & I determined that LoadObjectFromFileOrCreateDefault fails on my machine (but not his) when compiler optimizations are turned on. Since the function is unused in VDrift, I have commented it out, along with its test.