X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fyacsloader%2Fpmml%2FYACSPMMLBasicsTest1.cxx;h=6d85169695a2bc4e41274717e34f33c8d4933934;hb=1894c52d0838df8676e770bef061fc23ca436452;hp=f8f70b6c07ecdb8eab74543135a5e5d9c68478b0;hpb=14ddeddd588b20887c99de78c95d402527062012;p=modules%2Fyacs.git diff --git a/src/yacsloader/pmml/YACSPMMLBasicsTest1.cxx b/src/yacsloader/pmml/YACSPMMLBasicsTest1.cxx old mode 100755 new mode 100644 index f8f70b6c0..6d8516969 --- a/src/yacsloader/pmml/YACSPMMLBasicsTest1.cxx +++ b/src/yacsloader/pmml/YACSPMMLBasicsTest1.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D +// Copyright (C) 2007-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -43,7 +43,7 @@ #include #endif -//#define _DEVDEBUG_ +#define _DEVDEBUG_ #include "YacsTrace.hxx" using namespace YACS::ENGINE; @@ -125,19 +125,7 @@ int driverTest(Proc* &p, const char* schema) void YACSPMMLBasicsTest1::setUp() { -#ifdef WIN32 - const char* p = std::getenv("YACS_ROOT_DIR"); - std::string strP(""); - if (p) - strP = std::string(p); - else - throw std::string("unable to get YACS_ROOT_DIR"); - resourcesDir = strP; - resourcesDir += "/share/salome/yacssamples/"; -#else - resourcesDir = getenv("YACS_ROOT_DIR"); - resourcesDir += "/share/salome/yacssamples/"; -#endif + resourcesDir = "samples/"; } void YACSPMMLBasicsTest1::tearDown() @@ -158,6 +146,7 @@ void YACSPMMLBasicsTest1::testYACSdriverLinearRegression() YACS::ENGINE::Node* node = p->nodeMap[string("PyGetRes")]; YACS::ENGINE::OutputPort* outputPort = node->getOutputPort(string("res")); string str = outputPort->getAsString(); + DEBTRACE("str = " << str); CPPUNIT_ASSERT_EQUAL(str, string("True")); delete p; } @@ -176,6 +165,7 @@ void YACSPMMLBasicsTest1::testYACSdriverNeuralNetwork() YACS::ENGINE::Node* node = p->nodeMap[string("PyGetRes")]; YACS::ENGINE::OutputPort* outputPort = node->getOutputPort(string("res")); string str = outputPort->getAsString(); + DEBTRACE("str = " << str); CPPUNIT_ASSERT_EQUAL(str, string("True")); delete p; } @@ -194,6 +184,7 @@ void YACSPMMLBasicsTest1::testYACSdriver_LRANN() YACS::ENGINE::Node* node = p->nodeMap[string("PyGetRes")]; YACS::ENGINE::OutputPort* outputPort = node->getOutputPort(string("res")); string str = outputPort->getAsString(); + DEBTRACE("str = " << str); CPPUNIT_ASSERT_EQUAL(str, string("True")); delete p; } @@ -212,6 +203,7 @@ void YACSPMMLBasicsTest1::testYACSdriver_PmmlDoesNotExist() YACS::ENGINE::Node* node = p->nodeMap[string("PyGetRes")]; YACS::ENGINE::OutputPort* outputPort = node->getOutputPort(string("res")); string str = outputPort->getAsString(); + DEBTRACE("str = " << str); CPPUNIT_ASSERT_EQUAL(str, string("None")); delete p; }