path_to_executable.cpp 480 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
  9. std::string ending = "libigl_tests";
  10. REQUIRE(ending.size() < path_to_executable.size());
  11. REQUIRE(std::equal(ending.rbegin(), ending.rend(), path_to_executable.rbegin()));
  12. }