[mlpack-git] [mlpack] Serialization Test Fails on Windows (#482)
Joseph Mariadassou
notifications at github.com
Sun Nov 22 18:52:34 EST 2015
This issue is similar to the load-save-test issue I raised earlier. But this time the error is in the test routine. Consider the following code from serial_test.cpp:
<code>
/ Test function for loading and saving Armadillo objects.
template<typename MatType,
typename IArchiveType,
typename OArchiveType>
void TestArmadilloSerialization(MatType& x)
{
// First save it.
ofstream ofs("test");
OArchiveType o(ofs);
</code>
If the (I/0)ArchiveType is binary then the test fails due to the two character CR-LF eol marker. There are two options: one is to open the file as binary always; the other is partial function template specialization or something like that. I tried some tests using ios::binary and they seem to pass. But I am not sure about the general repercussions of opening a text file as binary.
---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/482
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20151122/f04ea724/attachment.html>
More information about the mlpack-git
mailing list