Skip to content

Commit

Permalink
Coverage++
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Nov 30, 2017
1 parent 27b7ad7 commit e81f2ca
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/simulation/OneTaskTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,31 @@ class ExecutionWithLocationMapTestWMS : public wrench::WMS {
throw std::runtime_error("Output file not written to storage service");
}


/* Do a bogus lookup of the file registry service */
bool success = true;
try {
this->simulation->getFileRegistryService()->lookupEntry(nullptr);
} catch (std::invalid_argument &e) {
success = false;
}
if (success) {
throw std::runtime_error("Shouldn't be able to lookup a nullptr entry in the File Registry Service");
}

/* Do a bogus add entry of the file registry service */
success = true;
try {
this->simulation->getFileRegistryService()->addEntry(nullptr, nullptr);
} catch (std::invalid_argument &e) {
success = false;
}
if (success) {
throw std::runtime_error("Shouldn't be able to add nullptr entry in the File Registry Service");
}



// Terminate
this->simulation->shutdownAllComputeServices();
this->simulation->shutdownAllStorageServices();
Expand Down

0 comments on commit e81f2ca

Please sign in to comment.