From: adam Date: Wed, 7 Oct 2009 13:59:00 +0000 (+0000) Subject: windows port X-Git-Tag: V5_1_main_FINAL~317 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3325d2a38b0e7fa50dcf010d9d5c3980504290af;p=tools%2Fmedcoupling.git windows port --- diff --git a/src/INTERP_KERNELTest/Makefile.am b/src/INTERP_KERNELTest/Makefile.am index 242f5f43f..7651c0533 100644 --- a/src/INTERP_KERNELTest/Makefile.am +++ b/src/INTERP_KERNELTest/Makefile.am @@ -123,9 +123,7 @@ endif PerfTest_SOURCES = \ PerfTest.cxx \ MeshTestToolkit.hxx \ - MeshTestToolkit.txx \ - TestInterpKernelUtils.hxx\ - TestInterpKernelUtils.cxx + MeshTestToolkit.txx PerfTest_CPPFLAGS = $(libInterpKernelTest_la_CPPFLAGS) PerfTest_LDADD = $(MED2_LIBS) $(libInterpKernelTest_la_LDFLAGS) libInterpKernelTest.la diff --git a/src/INTERP_KERNELTest/TestInterpKernelUtils.hxx b/src/INTERP_KERNELTest/TestInterpKernelUtils.hxx index 29209ffaf..8a6e18b23 100644 --- a/src/INTERP_KERNELTest/TestInterpKernelUtils.hxx +++ b/src/INTERP_KERNELTest/TestInterpKernelUtils.hxx @@ -23,12 +23,14 @@ #ifndef _TESTINTERPKERNELUTILS_HXX_ #define _TESTINTERPKERNELUTILS_HXX_ +#include "InterpKernelTestExport.hxx" + #include namespace INTERP_TEST { - std::string getResourceFile( const std::string& ); + INTERPKERNELTEST_EXPORT std::string getResourceFile( const std::string& ); } // namespace INTERP_TEST diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index a560bef91..cdccb397f 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -444,7 +444,7 @@ MEDCouplingPointSet *MEDCouplingUMesh::buildPartOfMySelfNode(const int *start, c if(locMerge.size()==refLgth && fullyIn || locMerge.size()!=0 && !fullyIn) cellIdsKept.push_back(i); } - return buildPartOfMySelf(&cellIdsKept[0],&cellIdsKept[cellIdsKept.size()],true); + return buildPartOfMySelf(&cellIdsKept[0],&cellIdsKept[0]+cellIdsKept.size(),true); } MEDCouplingPointSet *MEDCouplingUMesh::buildBoundaryMesh(bool keepCoords) const @@ -465,7 +465,7 @@ MEDCouplingPointSet *MEDCouplingUMesh::buildBoundaryMesh(bool keepCoords) const if(revDescIndxC[i+1]-revDescIndxC[i]==1) boundaryCells.push_back(i); revDescIndx->decrRef(); - MEDCouplingPointSet *ret=meshDM1->buildPartOfMySelf(&boundaryCells[0],&boundaryCells[boundaryCells.size()],keepCoords); + MEDCouplingPointSet *ret=meshDM1->buildPartOfMySelf(&boundaryCells[0],&boundaryCells[0]+boundaryCells.size(),keepCoords); meshDM1->decrRef(); return ret; } diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest.cxx index 51b8bc29e..74d17861e 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest.cxx @@ -1569,7 +1569,21 @@ void MEDCouplingBasicsTest::testInterpolationCC() for ( map::iterator s_v = res[i].begin(); s_v != res[i].end(); ++s_v) { sum += s_v->second; - vals.insert( precis * round( s_v->second / precis )); + double vvv; +#ifdef WNT + double vv = s_v->second / precis; + if(vv>=0.0) + { + vvv = floor(vv+0.5); + } + else + { + vvv = ceil(vv-0.5); + } +#else + vvv = round( s_v->second / precis ); +#endif + vals.insert( precis * vvv ); } //cout << "tgt: " << i << " src: " << s_v->first << " - w: " << s_v->second << endl; CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.0, sum, precis ); diff --git a/src/MEDCoupling/Test/Makefile.am b/src/MEDCoupling/Test/Makefile.am index 875fec6e6..2b260fe9d 100755 --- a/src/MEDCoupling/Test/Makefile.am +++ b/src/MEDCoupling/Test/Makefile.am @@ -20,7 +20,7 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am bin_PROGRAMS= TestMEDCoupling -TestMEDCoupling_CPPFLAGS=@CPPUNIT_INCLUDES@ -I$(srcdir)/.. -I$(srcdir)/../../INTERP_KERNEL/Bases -I$(srcdir)/../../INTERP_KERNELTest -I$(srcdir)/../../INTERP_KERNEL -I$(srcdir)/../../INTERP_KERNEL/Geometric2D +TestMEDCoupling_CPPFLAGS=@CPPUNIT_INCLUDES@ @PTHREAD_CFLAGS@ -I$(srcdir)/.. -I$(srcdir)/../../INTERP_KERNEL/Bases -I$(srcdir)/../../INTERP_KERNELTest -I$(srcdir)/../../INTERP_KERNEL -I$(srcdir)/../../INTERP_KERNEL/Geometric2D TestMEDCoupling_LDFLAGS = @CPPUNIT_LIBS@ ../libmedcoupling.la ../../INTERP_KERNEL/libinterpkernel.la