X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNELTest%2FTestInterpKernelUtils.cxx;h=b0ee27d2413a3cf9c89932875c76b1e581715198;hb=c4551c56aa89896595842e5b41b048044681b4e8;hp=2275c57b0a939d7a62feb5dc98c0b2271759a37d;hpb=46b819946914fdf15215ad330f101d1bba5edc5b;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNELTest/TestInterpKernelUtils.cxx b/src/INTERP_KERNELTest/TestInterpKernelUtils.cxx index 2275c57b0..b0ee27d24 100644 --- a/src/INTERP_KERNELTest/TestInterpKernelUtils.cxx +++ b/src/INTERP_KERNELTest/TestInterpKernelUtils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 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 @@ -21,7 +21,12 @@ #include "InterpKernelException.hxx" #include +#ifdef WIN32 +#include +#define getcwd _getcwd +#else #include +#endif #include #include @@ -33,20 +38,22 @@ namespace INTERP_TEST if ( getenv("MEDCOUPLING_ROOT_DIR") ) { // use MEDCOUPLING_ROOT_DIR env.var resourceFile = getenv("MEDCOUPLING_ROOT_DIR"); - resourceFile += IK_PATH_SEP + "share" + IK_PATH_SEP + "resources" + IK_PATH_SEP + "med" + IK_PATH_SEP; + resourceFile += "/share/resources/med/"; resourceFile += filename; - std::ifstream my_file(resourceFile); + std::ifstream my_file(resourceFile.c_str()); if (my_file.good()) return resourceFile; } // else - resourceFile = get_current_dir_name(); - resourceFile += IK_PATH_SEP; + char * tmp_c = getcwd(NULL, 0); + resourceFile = tmp_c; + free(tmp_c); + resourceFile += "/"; for(int i=0; i