#include "MEDCouplingUMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingMemArray.hxx"
+#include "TestInterpKernelUtils.hxx" // getResourceFile()
#include <cmath>
#include <numeric>
using namespace std;
using namespace INTERP_KERNEL;
- string fileName=getResourceFile("pointe.med");
+ string fileName= INTERP_TEST::getResourceFile("pointe.med", 3);
vector<string> meshNames=MEDLoader::GetMeshNames(fileName.c_str());
CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size());
MEDCouplingUMesh *mesh=MEDLoader::ReadUMeshFromFile(fileName.c_str(),meshNames[0].c_str(),0);
using namespace std;
using namespace INTERP_KERNEL;
- string fileName=getResourceFile("polygones.med");
+ string fileName=INTERP_TEST::getResourceFile("polygones.med", 3);
vector<string> meshNames=MEDLoader::GetMeshNames(fileName.c_str());
CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size());
CPPUNIT_ASSERT(meshNames[0]=="Bord");
using namespace std;
using namespace INTERP_KERNEL;
- string fileName=getResourceFile("poly3D.med");
+ string fileName=INTERP_TEST::getResourceFile("poly3D.med", 3);
vector<string> meshNames=MEDLoader::GetMeshNames(fileName.c_str());
CPPUNIT_ASSERT_EQUAL(1,(int)meshNames.size());
CPPUNIT_ASSERT(meshNames[0]=="poly3D");
mesh->decrRef();
}
-std::string MEDLoaderTest::getResourceFile( const std::string& filename ) const
-{
- std::string resourceFile = "";
-
- if ( getenv("top_srcdir") ) {
- // we are in 'make test' step
- resourceFile = getenv("top_srcdir");
- resourceFile += "/resources/";
- }
- else if ( getenv("MED_ROOT_DIR") ) {
- // use MED_ROOT_DIR env.var
- resourceFile = getenv("MED_ROOT_DIR");
- resourceFile += "/share/salome/resources/med/";
- }
- resourceFile += filename;
- return resourceFile;
-}
-
-
MEDCouplingUMesh *MEDLoaderTest::build1DMesh_1()
{
double coords[6]={ 0.0, 0.3, 0.75, 1.0, 1.4, 1.3 };