1616
1717void compare (const std::filesystem::path& file1, const std::filesystem::path& file2, float tolerance);
1818
19-
20- TEST (SmokeTest, MessagingRequiresJobID) {
21- #ifndef USE_MESSAGING
22- return ; // no need to test this
23- #endif
19+ TEST (SmokeTest, UserProvidesFilesWithoutJMS) {
20+ constexpr int taskID = -1 , hashID = 1489333437 ;
2421 const std::filesystem::path RESOURCE_DIRECTORY{RESOURCE_DIR};
25- const std::filesystem::path OUTPUT_TARGET{RESOURCE_DIRECTORY /" SimID_1489333437_0_ .ida" ,};
22+ const std::filesystem::path OUTPUT_TARGET{RESOURCE_DIRECTORY /std::format ( " SimID_{}_0_ .ida" , hashID) };
2623 const std::array NECESSARY_FILES{
27- RESOURCE_DIRECTORY /" SimID_1489333437_0_ .cvodeInput" ,
28- RESOURCE_DIRECTORY /" SimID_1489333437_0_ .ida.expected"
24+ RESOURCE_DIRECTORY /std::format ( " SimID_{}_0_ .cvodeInput" , hashID) ,
25+ RESOURCE_DIRECTORY /std::format ( " SimID_{}_0_ .ida.expected" , hashID)
2926 };
3027 for (const auto & file : NECESSARY_FILES) {
3128 assert (std::filesystem::exists (file));
@@ -39,16 +36,14 @@ TEST(SmokeTest, MessagingRequiresJobID) {
3936 throw std::runtime_error (" Could not open output file[" + OUTPUT_TARGET.string () + " ] for writing." );
4037 }
4138
42- EXPECT_THROW ( activateSolver (inputFileStream, outputFile, - 1 ), std::runtime_error );
39+ activateSolver (inputFileStream, outputFile, taskID );
4340 fclose (outputFile);
41+
42+ compare (OUTPUT_TARGET, NECESSARY_FILES[1 ], 1e-7 );
4443}
4544
46- TEST (SmokeTest, ConfirmExecution) {
47- #ifdef USE_MESSAGING
48- const int taskID = 2025 , hashID = 256118677 ;
49- #else
50- const int taskID = -1 , hashID = 1489333437 ;
51- #endif
45+ TEST (SmokeTest, UserProvidesFilesWithJMS) {
46+ constexpr int taskID = 2025 , hashID = 256118677 ;
5247 const std::filesystem::path RESOURCE_DIRECTORY{RESOURCE_DIR};
5348 const std::filesystem::path OUTPUT_TARGET{RESOURCE_DIRECTORY /std::format (" SimID_{}_0_.ida" , hashID)};
5449 const std::array NECESSARY_FILES{
0 commit comments