TestHelper.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-15
  6. * Changed: 2020-08-16
  7. *
  8. * */
  9. #ifndef TEST_HELPER_HPP
  10. #define TEST_HELPER_HPP
  11. #include <string>
  12. class TestHelper {
  13. public:
  14. TestHelper() = default;
  15. ~TestHelper() = default;
  16. static std::string getResourcesFolderLocation() {
  17. std::string location {};
  18. #ifdef _WIN32
  19. location = TestHelper::getTestFolderLocation() + R"(resources\)";
  20. #endif
  21. #ifdef unix
  22. location = TestHelper::getTestFolderLocation() + R"(resources/)";
  23. #endif
  24. #ifdef __APPLE__
  25. location = TestHelper::getTestFolderLocation() + R"(resources/)";
  26. #endif
  27. return location;
  28. }
  29. static std::string getTestFolderLocation() {
  30. std::string location {};
  31. #ifdef _WIN32
  32. location = R"(C:\Users\drums\CLionProjects\lynar-studios-standard-library\test\)";
  33. #endif
  34. #ifdef unix
  35. location = R"(/home/patrick/CLionProjects/lynar-studios-standard-library/test/)";
  36. #endif
  37. #ifdef __APPLE__
  38. location = R"(/Users/patrickmattulat/CLionProjects/lynar-studios-standard-library/test/)";
  39. #endif
  40. return location;
  41. }
  42. };
  43. #endif