TestHelper.hpp 1.3 KB

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