1 // Copyright (C) 2006-2016 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "yacsconfig.h"
21 #include "RuntimeSALOME.hxx"
22 #include "PythonPorts.hxx"
23 #include "CORBAPorts.hxx"
24 #include "YacsLoaderTest.hxx"
25 #include "parsers.hxx"
27 #include "Exception.hxx"
28 #include "Executor.hxx"
29 #include "parsers.hxx"
37 #define access _access
43 #include "YacsTrace.hxx"
45 using namespace YACS::ENGINE;
49 int driverTest(Proc* &p, const char* schema)
51 DEBTRACE("+++++++++++++++++++ BEGIN test " << schema);
52 RuntimeSALOME::setRuntime();
59 p=loader.load(schema);
60 DEBTRACE("Proc *p = " << p);
61 std::ofstream f("toto");
64 DEBTRACE("+++++++++++++++++++ BEGIN execution " << schema);
66 DEBTRACE("+++++++++++++++++++ END execution " << schema);
67 std::ofstream g("titi");
70 DEBTRACE("+++++++++++++++++++ END test " << schema);
73 catch (YACS::Exception& e)
75 DEBTRACE("YACS exception caught: ");
77 DEBTRACE("+++++++++++++++++++ END test in error " << schema);
80 catch (const std::ios_base::failure&)
82 DEBTRACE("io failure");
83 DEBTRACE("+++++++++++++++++++ END test in error " << schema);
86 catch(CORBA::SystemException& ex)
88 DEBTRACE("Caught a CORBA::SystemException.");
91 CORBA::TypeCode_var tc = tmp.type();
92 const char *p = tc->name();
101 DEBTRACE("+++++++++++++++++++ END test in error " << schema);
104 catch(omniORB::fatalException& fe)
106 DEBTRACE("Caught omniORB::fatalException:" );
107 DEBTRACE(" file: " << fe.file());
108 DEBTRACE(" line: " << fe.line());
109 DEBTRACE(" mesg: " << fe.errmsg());
110 DEBTRACE("+++++++++++++++++++ END test in error " << schema);
115 DEBTRACE("Caught unknown exception.");
116 DEBTRACE("+++++++++++++++++++ END test in error " << schema);
121 void YacsLoaderTest::setUp()
125 void YacsLoaderTest::tearDown()
129 void YacsLoaderTest::aschema()
132 int ret = driverTest(p, "samples/aschema.xml");
133 CPPUNIT_ASSERT(ret == 0);
134 CPPUNIT_ASSERT(p != 0);
137 CORBA::Double dval = 0;
138 char *text = (char*)"";
139 CPPUNIT_ASSERT(p->nodeMap["c0.c1.n1"]);
140 *((OutputCorbaPort*)p->nodeMap["c0.c1.n1"]->getOutputPort("p1"))->getAny() >>= dval;
141 PyObject *data = ((OutputPyPort*)p->nodeMap["node32"]->getOutputPort("p1"))->get();
142 double val = PyFloat_AsDouble(data);
143 CPPUNIT_ASSERT_DOUBLES_EQUAL(22., dval, 1.E-12);
144 CPPUNIT_ASSERT_DOUBLES_EQUAL(20., val, 1.E-12);
149 void YacsLoaderTest::bschema()
152 int ret = driverTest(p, "samples/bschema.xml");
153 CPPUNIT_ASSERT(ret == 0);
154 DEBTRACE("Proc *p = " << p);
155 CPPUNIT_ASSERT(p != 0);
158 CORBA::Double dval = 0;
159 const char *text = "";
160 *((OutputCorbaPort*)p->nodeMap["node1"]->getOutputPort("p1"))->getAny() >>= dval;
161 *((OutputCorbaPort*)p->nodeMap["node2"]->getOutputPort("p1"))->getAny() >>= text;
162 CPPUNIT_ASSERT_DOUBLES_EQUAL(24., dval, 1.E-12);
163 CPPUNIT_ASSERT_EQUAL(string("coucou"), string(text));
168 void YacsLoaderTest::cschema()
171 int ret = driverTest(p, "samples/cschema.xml");
172 CPPUNIT_ASSERT(ret == 0);
173 DEBTRACE("Proc *p = " << p);
174 CPPUNIT_ASSERT(p != 0);
178 if(getenv("PYHELLO_ROOT_DIR"))
180 std::string hellodir(getenv("PYHELLO_ROOT_DIR"));
181 hellodir=hellodir+"/share/salome/resources/pyhello";
182 if(access(hellodir.c_str(),F_OK) == 0)
184 CORBA::Double dval = 0;
185 const char *text = "";
186 *((OutputCorbaPort*)p->nodeMap["node1"]->getOutputPort("p1"))->getAny() >>= text;
187 CPPUNIT_ASSERT_EQUAL(string("Hello coucou!"), string(text) );
189 *((OutputCorbaPort*)p->nodeMap["node2"]->getOutputPort("p1"))->getAny() >>= text;
190 CPPUNIT_ASSERT_EQUAL(string("Hello Hello coucou!!"), string(text) );
198 void YacsLoaderTest::dschema()
201 int ret = driverTest(p, "samples/dschema.xml");
202 CPPUNIT_ASSERT(ret == 0);
203 DEBTRACE("Proc *p = " << p);
204 CPPUNIT_ASSERT(p != 0);
208 if(getenv("PYHELLO_ROOT_DIR"))
210 std::string hellodir(getenv("PYHELLO_ROOT_DIR"));
211 hellodir=hellodir+"/share/salome/resources/pyhello";
212 if(access(hellodir.c_str(),F_OK) == 0)
214 CORBA::Double dval = 0;
215 const char *text = "";
216 *((OutputCorbaPort*)p->nodeMap["node1"]->getOutputPort("p1"))->getAny() >>= text;
217 CPPUNIT_ASSERT_EQUAL(string("Hello coucou!"), string(text) );
219 *((OutputCorbaPort*)p->nodeMap["node2"]->getOutputPort("p1"))->getAny() >>= text;
220 CPPUNIT_ASSERT_EQUAL(string("Hello Hello coucou!!"), string(text) );
222 *((OutputCorbaPort*)p->nodeMap["node3"]->getOutputPort("p1"))->getAny() >>= text;
223 CPPUNIT_ASSERT_EQUAL( string("Hello Hello coucou!!"), string(text));
231 void YacsLoaderTest::eschema()
234 int ret = driverTest(p, "samples/eschema.xml");
235 CPPUNIT_ASSERT(ret == 0);
236 DEBTRACE("Proc *p = " << p);
237 CPPUNIT_ASSERT(p != 0);
240 PyObject *data = ((OutputPyPort*)p->nodeMap["node2"]->getOutputPort("p1"))->get();
241 char *text = PyString_AsString(data);
242 CPPUNIT_ASSERT_EQUAL(string("coucoucoucoucoucoucoucou"), string(text));
247 void YacsLoaderTest::fschema()
250 int ret = driverTest(p, "samples/fschema.xml");
251 CPPUNIT_ASSERT(ret == 0);
252 DEBTRACE("Proc *p = " << p);
253 CPPUNIT_ASSERT(p != 0);
256 PyObject *data = ((OutputPyPort*)p->nodeMap["node2"]->getOutputPort("p1"))->get();
257 char *text = PyString_AsString(data);;
258 CPPUNIT_ASSERT_EQUAL(string("coucoucoucoucoucoucoucou"), string(text) );
263 void YacsLoaderTest::oschema()
266 int ret = driverTest(p, "samples/oschema.xml");
267 CPPUNIT_ASSERT(ret == 1);
270 void YacsLoaderTest::pschema()
273 int ret = driverTest(p, "samples/pschema.xml");
274 CPPUNIT_ASSERT(ret == 0);
275 DEBTRACE("Proc *p = " << p);
276 CPPUNIT_ASSERT(p != 0);
280 CORBA::Double dval = 0;
281 *((OutputCorbaPort*)p->nodeMap["node61"]->getOutputPort("p1"))->getAny() >>= dval;
282 CPPUNIT_ASSERT_DOUBLES_EQUAL(25., dval, 1.E-12);
285 CORBA::Double dval = 0;
286 *((OutputCorbaPort*)p->nodeMap["node62"]->getOutputPort("p1"))->getAny() >>= dval;
287 CPPUNIT_ASSERT_DOUBLES_EQUAL(25., dval, 1.E-12);
290 CORBA::Double dval = 0;
291 *((OutputCorbaPort*)p->nodeMap["node63"]->getOutputPort("p1"))->getAny() >>= dval;
292 CPPUNIT_ASSERT_DOUBLES_EQUAL(25., dval, 1.E-12);
298 void YacsLoaderTest::schema()
301 int ret = driverTest(p, "samples/schema.xml");
302 CPPUNIT_ASSERT(ret == 1);
305 void YacsLoaderTest::schema2()
308 int ret = driverTest(p, "samples/schema2.xml");
309 CPPUNIT_ASSERT(ret == 0);
310 DEBTRACE("Proc *p = " << p);
311 CPPUNIT_ASSERT(p != 0);
315 CORBA::Double dval = 0;
316 *((OutputCorbaPort*)p->nodeMap["node61"]->getOutputPort("p1"))->getAny() >>= dval;
317 CPPUNIT_ASSERT_DOUBLES_EQUAL(25., dval, 1.E-12);
320 CORBA::Double dval = 0;
321 *((OutputCorbaPort*)p->nodeMap["node62"]->getOutputPort("p1"))->getAny() >>= dval;
322 CPPUNIT_ASSERT_DOUBLES_EQUAL(25., dval, 1.E-12);
325 CORBA::Double dval = 0;
326 *((OutputCorbaPort*)p->nodeMap["node63"]->getOutputPort("p1"))->getAny() >>= dval;
327 CPPUNIT_ASSERT_DOUBLES_EQUAL(25., dval, 1.E-12);
333 catch (YACS::Exception& e)
335 DEBTRACE("YACS exception caught: ");
338 catch (const std::ios_base::failure&)
340 DEBTRACE("io failure");
342 catch(CORBA::SystemException& ex)
344 DEBTRACE("Caught a CORBA::SystemException.");
347 CORBA::TypeCode_var tc = tmp.type();
348 const char *p = tc->name();
358 catch(omniORB::fatalException& fe)
360 DEBTRACE("Caught omniORB::fatalException:" );
361 DEBTRACE(" file: " << fe.file());
362 DEBTRACE(" line: " << fe.line());
363 DEBTRACE(" mesg: " << fe.errmsg());
367 DEBTRACE("unknown exception");
372 void YacsLoaderTest::forloop1()
375 int ret = driverTest(p, "samples/forloop1.xml");
376 CPPUNIT_ASSERT(ret == 0);
377 DEBTRACE("Proc *p = " << p);
378 CPPUNIT_ASSERT(p != 0);
381 PyObject *data = ((OutputPyPort*)p->nodeMap["b1.node2"]->getOutputPort("p1"))->get();
382 double val = PyFloat_AsDouble(data);;
383 CPPUNIT_ASSERT_DOUBLES_EQUAL(33., val, 1.E-12);
388 void YacsLoaderTest::forloop2()
391 int ret = driverTest(p, "samples/forloop2.xml");
392 CPPUNIT_ASSERT(ret == 0);
395 /////////////////////////////
397 void YacsLoaderTest::forloop3()
400 int ret = driverTest(p, "samples/forloop3.xml");
401 CPPUNIT_ASSERT(ret == 0);
402 DEBTRACE("Proc *p = " << p);
403 CPPUNIT_ASSERT(p != 0);
410 void YacsLoaderTest::forloop4()
413 int ret = driverTest(p, "samples/forloop4.xml");
414 CPPUNIT_ASSERT(ret == 0);
415 DEBTRACE("Proc *p = " << p);
416 CPPUNIT_ASSERT(p != 0);
423 void YacsLoaderTest::forloop5()
426 int ret = driverTest(p, "samples/forloop5.xml");
427 CPPUNIT_ASSERT(ret == 0);
428 DEBTRACE("Proc *p = " << p);
429 CPPUNIT_ASSERT(p != 0);
436 void YacsLoaderTest::forloop6()
439 int ret = driverTest(p, "samples/forloop6.xml");
440 CPPUNIT_ASSERT(ret == 0);
441 DEBTRACE("Proc *p = " << p);
442 CPPUNIT_ASSERT(p != 0);
450 void YacsLoaderTest::forloop7()
453 int ret = driverTest(p, "samples/forloop7.xml");
454 CPPUNIT_ASSERT(ret == 0);
455 DEBTRACE("Proc *p = " << p);
456 CPPUNIT_ASSERT(p != 0);
463 void YacsLoaderTest::switch1()
466 int ret = driverTest(p, "samples/switch1.xml");
467 CPPUNIT_ASSERT(ret == 0);
468 DEBTRACE("Proc *p = " << p);
469 CPPUNIT_ASSERT(p != 0);
476 void YacsLoaderTest::switch2()
479 int ret = driverTest(p, "samples/switch2.xml");
480 CPPUNIT_ASSERT(ret == 0);
481 DEBTRACE("Proc *p = " << p);
482 CPPUNIT_ASSERT(p != 0);
489 void YacsLoaderTest::switch3()
492 int ret = driverTest(p, "samples/switch3.xml");
493 CPPUNIT_ASSERT(ret == 0);
494 DEBTRACE("Proc *p = " << p);
495 CPPUNIT_ASSERT(p != 0);
502 void YacsLoaderTest::switch4()
505 int ret = driverTest(p, "samples/switch4.xml");
506 CPPUNIT_ASSERT(ret == 0);
507 DEBTRACE("Proc *p = " << p);
508 CPPUNIT_ASSERT(p != 0);
515 void YacsLoaderTest::switch5()
518 int ret = driverTest(p, "samples/switch5.xml");
519 CPPUNIT_ASSERT(ret == 0);
520 DEBTRACE("Proc *p = " << p);
521 CPPUNIT_ASSERT(p != 0);
528 void YacsLoaderTest::switch6()
531 int ret = driverTest(p, "samples/switch6.xml");
532 CPPUNIT_ASSERT(ret == 0);
533 DEBTRACE("Proc *p = " << p);
534 CPPUNIT_ASSERT(p != 0);
541 void YacsLoaderTest::switch7()
544 int ret = driverTest(p, "samples/switch7.xml");
545 CPPUNIT_ASSERT(ret == 0);
546 DEBTRACE("Proc *p = " << p);
547 CPPUNIT_ASSERT(p != 0);
554 void YacsLoaderTest::switch8()
557 int ret = driverTest(p, "samples/switch8.xml");
558 CPPUNIT_ASSERT(ret == 0);
559 DEBTRACE("Proc *p = " << p);
560 CPPUNIT_ASSERT(p != 0);
567 void YacsLoaderTest::switch9()
570 int ret = driverTest(p, "samples/switch9.xml");
571 CPPUNIT_ASSERT(ret == 0);
572 DEBTRACE("Proc *p = " << p);
573 CPPUNIT_ASSERT(p != 0);
580 void YacsLoaderTest::whiles()
583 int ret = driverTest(p, "samples/while1.xml");
584 CPPUNIT_ASSERT(ret == 0);
585 DEBTRACE("Proc *p = " << p);
586 CPPUNIT_ASSERT(p != 0);
591 ret = driverTest(p, "samples/while2.xml");
592 CPPUNIT_ASSERT(ret == 0);
593 ret = driverTest(p, "samples/while3.xml");
594 CPPUNIT_ASSERT(ret == 0);
597 void YacsLoaderTest::forwhile1()
600 int ret = driverTest(p, "samples/forwhile1.xml");
601 CPPUNIT_ASSERT(ret == 0);
602 DEBTRACE("Proc *p = " << p);
603 CPPUNIT_ASSERT(p != 0);
610 void YacsLoaderTest::blocs()
614 ret = driverTest(p, "samples/bloc1.xml");
615 CPPUNIT_ASSERT(ret == 0);
616 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
617 ret = driverTest(p, "samples/bloc2.xml");
618 CPPUNIT_ASSERT(ret == 0);
619 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
620 ret = driverTest(p, "samples/bloc3.xml");
621 CPPUNIT_ASSERT(ret == 0);
622 CPPUNIT_ASSERT(p->getEffectiveState() != YACS::DONE );
623 ret = driverTest(p, "samples/bloc4.xml");
624 CPPUNIT_ASSERT(ret == 0);
625 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
628 void YacsLoaderTest::refcnt()
633 ret = driverTest(p, "samples/refcnt1.xml");
634 CPPUNIT_ASSERT(ret == 0);
635 data = ((OutputPyPort*)p->nodeMap["b1.b.node1"]->getOutputPort("p1"))->get();
636 CPPUNIT_ASSERT(data->ob_refcnt==13);
637 ret = driverTest(p, "samples/refcnt2.xml");
638 CPPUNIT_ASSERT(ret == 0);
639 data = ((OutputPyPort*)p->nodeMap["b1.b.node1"]->getOutputPort("p1"))->get();
640 CPPUNIT_ASSERT(data->ob_refcnt==19);
643 void YacsLoaderTest::foreachs()
647 ret = driverTest(p, "samples/foreach1.xml");
648 CPPUNIT_ASSERT_MESSAGE("Schema: foreach1.xml", ret == 0);
649 CPPUNIT_ASSERT_MESSAGE("Schema: foreach1.xml", p->getEffectiveState() == YACS::DONE);
651 ret = driverTest(p, "samples/foreach2.xml");
652 CPPUNIT_ASSERT_MESSAGE("Schema: foreach2.xml", ret == 0);
653 CPPUNIT_ASSERT_MESSAGE("Schema: foreach2.xml", p->getEffectiveState() == YACS::DONE );
655 ret = driverTest(p, "samples/foreach3.xml");
656 CPPUNIT_ASSERT_MESSAGE("Schema: foreach3.xml", ret == 1);
658 ret = driverTest(p, "samples/foreach4.xml");
659 CPPUNIT_ASSERT_MESSAGE("Schema: foreach4.xml", ret == 0);
660 CPPUNIT_ASSERT_MESSAGE("Schema: foreach4.xml", p->getEffectiveState() == YACS::DONE );
662 ret = driverTest(p, "samples/foreach5.xml");
663 CPPUNIT_ASSERT_MESSAGE("Schema: foreach5.xml", ret == 0);
664 CPPUNIT_ASSERT_MESSAGE("Schema: foreach5.xml", p->getEffectiveState() == YACS::DONE );
666 ret = driverTest(p, "samples/foreach6.xml");
667 CPPUNIT_ASSERT_MESSAGE("Schema: foreach6.xml", ret == 0);
668 CPPUNIT_ASSERT_MESSAGE("Schema: foreach6.xml", p->getEffectiveState() == YACS::DONE );
670 ret = driverTest(p, "samples/foreach8.xml");
671 CPPUNIT_ASSERT_MESSAGE("Schema: foreach8.xml", ret == 0);
672 CPPUNIT_ASSERT_MESSAGE("Schema: foreach8.xml", p->getEffectiveState() == YACS::DONE );
674 ret = driverTest(p, "samples/foreach_init2fin.xml");
675 CPPUNIT_ASSERT_MESSAGE("Schema: foreach_init2fin.xml", ret == 0);
676 CPPUNIT_ASSERT_MESSAGE("Schema: foreach_init2fin.xml", p->getEffectiveState() == YACS::DONE );
678 ret = driverTest(p, "samples/foreach_init2work.xml");
679 CPPUNIT_ASSERT_MESSAGE("Schema: foreach_init2work.xml", ret == 0);
680 CPPUNIT_ASSERT_MESSAGE("Schema: foreach_init2work.xml", p->getEffectiveState() == YACS::DONE );
681 CPPUNIT_ASSERT_EQUAL(p->getOutputPort("PostProc.r")->getAsString(), std::string("108"));
683 if(getenv("GEOM_ROOT_DIR"))
685 std::string geomdir(getenv("GEOM_ROOT_DIR"));
686 geomdir=geomdir+"/share/salome/resources/geom";
687 if(access(geomdir.c_str(),F_OK) == 0)
689 ret = driverTest(p, "samples/foreach7.xml"); //needs GEOM_Superv component
690 CPPUNIT_ASSERT_MESSAGE("Schema: foreach7.xml", ret == 0);
691 CPPUNIT_ASSERT_MESSAGE("Schema: foreach7.xml", p->getEffectiveState() == YACS::DONE );
697 void YacsLoaderTest::sinlines()
701 ret = driverTest(p, "samples/sinline1.xml");
702 CPPUNIT_ASSERT(ret == 0);
703 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
704 ret = driverTest(p, "samples/sinline2.xml");
705 CPPUNIT_ASSERT(ret == 0);
706 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
707 ret = driverTest(p, "samples/sinline3.xml");
708 CPPUNIT_ASSERT(ret == 0);
709 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
710 ret = driverTest(p, "samples/sinline4.xml");
711 CPPUNIT_ASSERT(ret == 0);
712 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
713 ret = driverTest(p, "samples/sinline5.xml");
714 CPPUNIT_ASSERT(ret == 0);
715 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
718 void YacsLoaderTest::bools()
722 ret = driverTest(p, "samples/bool1.xml");
723 CPPUNIT_ASSERT(ret == 0);
724 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
726 void YacsLoaderTest::integers()
730 ret = driverTest(p, "samples/integer1.xml");
731 CPPUNIT_ASSERT(ret == 0);
732 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
734 void YacsLoaderTest::doubles()
738 ret = driverTest(p, "samples/double1.xml");
739 CPPUNIT_ASSERT(ret == 0);
740 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
742 void YacsLoaderTest::strings()
746 ret = driverTest(p, "samples/string1.xml");
747 CPPUNIT_ASSERT(ret == 0);
748 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
750 void YacsLoaderTest::objrefs()
754 ret = driverTest(p, "samples/objref1.xml");
755 CPPUNIT_ASSERT(ret == 0);
756 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
758 void YacsLoaderTest::structs()
762 ret = driverTest(p, "samples/struct1.xml");
763 CPPUNIT_ASSERT(ret == 0);
764 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
767 ret = driverTest(p, "samples/struct2.xml");
768 CPPUNIT_ASSERT(ret == 0);
769 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
773 void YacsLoaderTest::cpps()
777 ret = driverTest(p, "samples/cpp1.xml");
778 CPPUNIT_ASSERT(ret == 0);
779 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
783 void YacsLoaderTest::datanodes()
787 ret = driverTest(p, "samples/datanode0.xml");
788 CPPUNIT_ASSERT(ret == 0);
789 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
793 void YacsLoaderTest::optimizers()
797 ret = driverTest(p, "samples/optimizer1.xml");
798 CPPUNIT_ASSERT(ret == 0);
799 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
802 ret = driverTest(p, "samples/optimizer2.xml");
803 CPPUNIT_ASSERT(ret == 0);
804 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
807 ret = driverTest(p, "samples/optimizer_sync_cpp.xml");
808 CPPUNIT_ASSERT(ret == 0);
809 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
812 ret = driverTest(p, "samples/optimizer_async_cpp.xml");
813 CPPUNIT_ASSERT(ret == 0);
814 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
817 ret = driverTest(p, "samples/optimizer_sync_py.xml");
818 CPPUNIT_ASSERT(ret == 0);
819 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
822 ret = driverTest(p, "samples/optimizer_async_py.xml");
823 CPPUNIT_ASSERT(ret == 0);
824 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
827 ret = driverTest(p, "samples/optimizer_retro.xml");
828 CPPUNIT_ASSERT(ret == 0);
829 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
833 void YacsLoaderTest::pyremotes()
837 ret = driverTest(p, "samples/pyremote1.xml");
838 CPPUNIT_ASSERT(ret == 0);
839 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
840 ret = driverTest(p, "samples/pyremote2.xml");
841 CPPUNIT_ASSERT(ret == 0);
842 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
843 ret = driverTest(p, "samples/pyremote3.xml");
844 CPPUNIT_ASSERT(ret == 0);
845 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );
846 ret = driverTest(p, "samples/pyremote4.xml");
847 CPPUNIT_ASSERT(ret == 0);
848 CPPUNIT_ASSERT(p->getEffectiveState() == YACS::DONE );