]> SALOME platform Git repositories - modules/yacs.git/blobdiff - src/runtime/Test/runtimeTest.cxx
Salome HOME
updated copyright message
[modules/yacs.git] / src / runtime / Test / runtimeTest.cxx
index 3bd3ad6a4ece429473df88fe9466ac89991d8a82..6af3df6a97558dac331b2e52d8e1e1ae68e74f40 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -48,7 +48,7 @@
 #include <cctype>
 #include <cstdlib>
 
-//#define _DEVDEBUG_
+#define _DEVDEBUG_
 #include "YacsTrace.hxx"
 
 using namespace YACS::ENGINE;
@@ -81,6 +81,32 @@ int RuntimeTest::_ibloc = 0;
 Runtime *RuntimeTest::_myRuntime = 0;
 bool RuntimeTest::endTests = false;
 
+RuntimeForTest::RuntimeForTest()
+: RuntimeSALOME(UsePython+UseCorba+UseXml+UseCpp+UseSalome, 0, nullptr)
+{
+}
+
+RuntimeForTest::~RuntimeForTest()
+{
+}
+
+std::vector< std::pair<std::string,int> >
+RuntimeForTest::getCatalogOfComputeNodes() const
+{
+  std::vector< std::pair<std::string,int> > result(1);
+  std::pair<std::string,int> localhost;
+  localhost.first = "localhost";
+  localhost.second = 8;
+  result[0] = localhost;
+  return result;
+}
+
+void RuntimeForTest::setRuntime()
+{
+  if (! Runtime::_singleton)
+    Runtime::_singleton = new RuntimeForTest;
+}
+
 void RuntimeTest::setUp()
 {
   if (_ltc.size() == 0)
@@ -103,7 +129,7 @@ void RuntimeTest::initRuntimeTypeCode()
 {
   // --- init runtime
   std::cerr << std::endl;
-  RuntimeSALOME::setRuntime();
+  RuntimeForTest::setRuntime();
   _myRuntime = getRuntime();
   
   // --- init typecodes
@@ -1469,7 +1495,7 @@ void RuntimeTest::convertPorts()
     }
 }
 
-void myTestRun(int nIn, int nOut, Any **In, Any **Out) throw (YACS::Exception)
+void myTestRun(int nIn, int nOut, Any **In, Any **Out)
 {
   double x, y;
   cerr << "myTestRun nIn = " << nIn << endl;