Skip to content

Commit

Permalink
test parameter missing
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Dec 24, 2024
1 parent 4dd06fa commit 58e1148
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/tests/src/solver/modeler/loadFiles/testParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,16 @@ BOOST_AUTO_TEST_CASE(read_parameters_out_of_order)
BOOST_CHECK_EQUAL(params.solverParameters, "PRESOLVE 1");
BOOST_CHECK_EQUAL(params.noOutput, true);
}

BOOST_AUTO_TEST_CASE(parameters_missing)
{
auto studyPath = CREATE_TMP_DIR_BASED_ON_TEST_NAME();
std::ofstream paramStream(studyPath / "parameters.yml");
paramStream << R"(
solver-logs: false
no-output: true
)";
paramStream.close();

BOOST_CHECK_THROW(Antares::Solver::LoadFiles::loadParameters(studyPath), std::runtime_error);
}

0 comments on commit 58e1148

Please sign in to comment.