Salome HOME
Fix issue when there are two optimizer loops.
[modules/yacs.git] / src / yacsloader / Test / YacsLoaderTest.cxx
index 15d995133fb905af2d681552804c0d661e639a4b..eca557c894ea553f322ca65c5d3ff091628f1121 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -842,6 +842,11 @@ void YacsLoaderTest::optimizers()
   CPPUNIT_ASSERT(ret == 0);
   CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
   delete p;
+
+  ret = driverTest(p, "samples/double_optimizer_py.xml");
+  CPPUNIT_ASSERT(ret == 0);
+  CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
+  delete p;
 }
 
 void YacsLoaderTest::pyremotes()
@@ -861,3 +866,14 @@ void YacsLoaderTest::pyremotes()
   CPPUNIT_ASSERT(ret == 0);
   CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
 }
+
+void YacsLoaderTest::nonepyobj()
+{
+  Proc *p = 0;
+  int ret;
+  ret = driverTest(p, "samples/nonepyobj.xml");
+  CPPUNIT_ASSERT(ret == 0);
+  CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
+  CPPUNIT_ASSERT_EQUAL(p->getOutputPort("n2.r")->getAsString(), std::string("True"));
+  delete p;
+}