path_to_executable.cpp 533 B

123456789101112131415
  1. #include <test_common.h>
  2. #include <igl/path_to_executable.h>
  3. #include <iostream>
  4. TEST_CASE("path_to_executable: example", "[igl]")
  5. {
  6. std::string path_to_executable = igl::path_to_executable();
  7. REQUIRE(0 < path_to_executable.size());
  8. // check if path_to_executable ends with correct file name, on windows .exe suffix is added.
  9. std::string executable = "test_igl_core";
  10. int pos = path_to_executable.length()-(executable.length() + 4/*".exe"*/);
  11. REQUIRE( std::string::npos != path_to_executable.find(executable, pos));
  12. }