29 lines
615 B
C++
29 lines
615 B
C++
#pragma once
|
|
|
|
#include "TestDataLocations.h"
|
|
|
|
#include <filesystem>
|
|
|
|
using Path = std::filesystem::path;
|
|
|
|
class TestUtils
|
|
{
|
|
public:
|
|
static Path getTestOutputDir(const std::string& testFileName = {})
|
|
{
|
|
if (!testFileName.empty())
|
|
{
|
|
const auto name = Path(testFileName).filename().stem();
|
|
return std::filesystem::current_path() / "test_output" / name;
|
|
}
|
|
else
|
|
{
|
|
return std::filesystem::current_path() / "test_output";
|
|
}
|
|
}
|
|
|
|
static Path getTestDataDir()
|
|
{
|
|
return TestDataLocations::getTestDataDir();
|
|
}
|
|
};
|