Commit 396a11fe authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[Tests] use different filenames for serialization tests

parent c08d0897
Pipeline #9441 passed with stage
in 7 minutes and 9 seconds
......@@ -143,20 +143,20 @@ class Constant3CurveTest(unittest.TestCase):
def test_serialization(self):
p = array([1, 23., 5.])
c = constant3(p, 0., 2.)
c.saveAsText("serialization_curve.txt")
c.saveAsXML("serialization_curve.xml", "constant")
c.saveAsBinary("serialization_curve")
c.saveAsText("serialization_constant.txt")
c.saveAsXML("serialization_constant.xml", "constant")
c.saveAsBinary("serialization_constant")
c_txt = constant3()
c_txt.loadFromText("serialization_curve.txt")
c_txt.loadFromText("serialization_constant.txt")
self.assertEqual(c, c_txt)
c_xml = constant3()
c_xml.loadFromXML("serialization_curve.xml", "constant")
c_xml.loadFromXML("serialization_constant.xml", "constant")
self.assertEqual(c, c_xml)
c_bin = constant3()
c_bin.loadFromBinary("serialization_curve")
c_bin.loadFromBinary("serialization_constant")
self.assertEqual(c, c_bin)
......
......@@ -160,20 +160,20 @@ class SinusoidalCurveTest(unittest.TestCase):
phi = 0.2
c = sinusoidal(p0, amp, T, phi, 2., 5.)
c.saveAsText("serialization_curve.txt")
c.saveAsXML("serialization_curve.xml", "sinusoidal")
c.saveAsBinary("serialization_curve")
c.saveAsText("serialization_sinusoidal.txt")
c.saveAsXML("serialization_sinusoidal.xml", "sinusoidal")
c.saveAsBinary("serialization_sinusoidal")
c_txt = sinusoidal()
c_txt.loadFromText("serialization_curve.txt")
c_txt.loadFromText("serialization_sinusoidal.txt")
self.assertEqual(c, c_txt)
c_xml = sinusoidal()
c_xml.loadFromXML("serialization_curve.xml", "sinusoidal")
c_xml.loadFromXML("serialization_sinusoidal.xml", "sinusoidal")
self.assertEqual(c, c_xml)
c_bin = sinusoidal()
c_bin.loadFromBinary("serialization_curve")
c_bin.loadFromBinary("serialization_sinusoidal")
self.assertEqual(c, c_bin)
......
......@@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE(comparison) {
}
BOOST_AUTO_TEST_CASE(serialization) {
std::string fileName("fileTest");
std::string fileName("fileTest_constant");
pointX_t p(4);
p << -1, 0.5, 2., 1.2;
......@@ -176,7 +176,7 @@ BOOST_AUTO_TEST_CASE(serialization) {
}
BOOST_AUTO_TEST_CASE(serialization_3) {
std::string fileName("fileTest");
std::string fileName("fileTest_constant3");
point3_t p;
p << -1, 0.5, 2.;
......
......@@ -239,7 +239,7 @@ BOOST_AUTO_TEST_CASE(comparison) {
}
BOOST_AUTO_TEST_CASE(serialization) {
std::string fileName("fileTest");
std::string fileName("fileTest_sinusoidal");
pointX_t p0(3), amp(3);
p0 << -1, 0.5, 2.;
amp << 2, -0.8, -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment