1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-02-01 12:18:27 +00:00

const params and use order of operations

This commit is contained in:
Bret Curtis 2023-04-28 21:40:26 +02:00
parent dcefc54093
commit 600649260c

View file

@ -18,18 +18,18 @@ class IniImporterTest : public ::testing::TestWithParam<TestParam>
TEST_P(IniImporterTest, TestIniImport)
{
auto param = IniImporterTest::GetParam();
auto const& param = IniImporterTest::GetParam();
// Create temporary file
std::string iniData = R"([Archives]
Archive 0=game1.bsa
Archive 1=game2.bsa
)";
std::filesystem::path tempIniFile = std::filesystem::temp_directory_path() / param.fileName += "morrowind.ini";
std::filesystem::path tempIniFile = std::filesystem::temp_directory_path() / (param.fileName + ".ini");
std::ofstream tempFile(tempIniFile);
tempFile << iniData;
tempFile.close();
std::filesystem::path tempCfgFile = std::filesystem::temp_directory_path() / param.fileName += "openmw.cfg";
std::filesystem::path tempCfgFile = std::filesystem::temp_directory_path() / (param.fileName + ".cfg");
std::stringstream cmd;
cmd << "./openmw-iniimporter -i " << tempIniFile << " -c " << tempCfgFile;