Salome HOME
Win32 compilation.
[modules/yacs.git] / src / bases / Test / basesTest.cxx
index 7f6217f961a85240ff79e3b5408d80bc3c9d02f0..851a6b6f201f15045984fe5b5a20d61fa51d6699 100644 (file)
@@ -1,21 +1,22 @@
-//  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2013  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
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include "basesTest.hxx"
 
 #include <iostream>
@@ -54,6 +55,7 @@ void *BasesTest::th1_1(void *st)
   _var+=2;
   _s1.post();
   _s2.post();
+  return 0;
 }
 
 void *BasesTest::th1_2(void *st)
@@ -62,6 +64,7 @@ void *BasesTest::th1_2(void *st)
   _s2.wait();
   _glob<< myName << _var;
   _s2.post();
+  return 0;
 }
 
 void *BasesTest::th1_3(void *st)
@@ -69,6 +72,7 @@ void *BasesTest::th1_3(void *st)
   char myName=*((char *) st);
   _glob<< myName << _var++;
   _s1.post();
+  return 0;
 }
 
 void *BasesTest::th2_1(void *)
@@ -85,6 +89,7 @@ void *BasesTest::th2_1(void *)
       _m.unlock();
       Thread::sleep(100000);
     }
+  return 0;
 }
 
 void *BasesTest::myFunc(void *n)
@@ -102,7 +107,8 @@ void *BasesTest::myFunc(void *n)
       DEBTRACE("thread " << id << " frees " << i << " resources");
       free_resources(id, i);
     }
-}
+  return 0;
+ }
 
 void BasesTest::get_resources(int id, int amount)
 {
@@ -200,7 +206,7 @@ void BasesTest::test3()
     }
   
   for (i=0; i<THREAD_NUM; i++)
-    {
+    {      
       ths[i] = new Thread(myFunc, &id[i]);
       CPPUNIT_ASSERT(count_resources() == BasesTest::MAX_RESOURCE);
     }
@@ -218,7 +224,7 @@ typedef double (*FctPt)(double);
 
 void BasesTest::testDL()
 {
-  DynLibLoader *loader=new DynLibLoader(".libs/libYACSDLTest");
+  DynLibLoader *loader=new DynLibLoader("libYACSDLTest");
   void *symb=loader->getHandleOnSymbolWithName("myYacsFct");
   FctPt f=(FctPt) symb;
   double res=f(1.7);