TestHelper.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Co-Author: Claude Sonnet 4.6 (LLM)
  4. * Company: Lynar Studios
  5. * E-Mail: webmaster@lynarstudios.com
  6. * Created: 2020-08-15
  7. * Changed: 2026-06-23
  8. *
  9. * */
  10. #ifndef LS_STD_TEST_HELPER_HPP
  11. #define LS_STD_TEST_HELPER_HPP
  12. #include <string>
  13. #include <vector>
  14. namespace ls::standard::test
  15. {
  16. class TestHelper
  17. {
  18. public:
  19. TestHelper();
  20. ~TestHelper();
  21. [[nodiscard]] static ::std::string getResourcesFolderLocation();
  22. [[nodiscard]] static ::std::string getTestFolderLocation();
  23. private:
  24. [[nodiscard]] static char _getFilePathSeparator();
  25. [[nodiscard]] static ::std::string _getParent(const ::std::string &_path);
  26. [[nodiscard]] static ::std::string _getWorkingDirectory();
  27. #if defined(unix) || defined(__APPLE__)
  28. [[nodiscard]] static ::std::string _getWorkingDirectoryUnix();
  29. #endif
  30. #ifdef _WIN32
  31. [[nodiscard]] static ::std::string _getWorkingDirectoryWindows();
  32. #endif
  33. [[nodiscard]] static ::std::string _normalizePath(::std::string _path);
  34. [[nodiscard]] static ::std::string _reduceSeparators(const ::std::string &_path);
  35. [[nodiscard]] static ::std::string _replaceWrongSeparator(::std::string _path);
  36. [[nodiscard]] static ::std::vector<::std::string> _splitIntoSubDirectoryNames(const ::std::string &_path);
  37. };
  38. }
  39. #endif