Skip to content

Commit

Permalink
A bit more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Feb 25, 2018
1 parent 39f5f55 commit 16479f7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/workflow/WorkflowLoadFromDAXTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class WorkflowLoadFromDAXTest : public ::testing::Test {
"<adag xmlns=\"http://pegasus.isi.edu/schema/DAX\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://pegasus.isi.edu/schema/DAX http://pegasus.isi.edu/schema/dax-2.1.xsd\" version=\"2.1\" count=\"1\" index=\"0\" name=\"test\" jobCount=\"36\" fileCount=\"0\" childCount=\"35\">"
"<!-- part 1: list of all referenced files (may be empty) -->"
"<!-- part 2: definition of all jobs (at least one) -->"
" <job id=\"ID00000\" namespace=\"Genome\" name=\"fastqSplit_chr21\" version=\"1.0\" runtime=\"35.79\">"
" <job id=\"ID00000\" namespace=\"Genome\" name=\"fastqSplit_chr21\" version=\"1.0\" runtime=\"35.79\" numprocs=\"3\">"
" <uses file=\"chr210.sfq\" link=\"input\" register=\"true\" transfer=\"true\" optional=\"false\" type=\"data\" size=\"249228055\"/>"
" <uses file=\"chr21.0.0.sfq\" link=\"output\" register=\"true\" transfer=\"true\" optional=\"false\" type=\"data\" size=\"30755085\"/>"
" <uses file=\"chr21.0.1.sfq\" link=\"output\" register=\"true\" transfer=\"true\" optional=\"false\" type=\"data\" size=\"31101555\"/>"
Expand Down Expand Up @@ -328,6 +328,7 @@ TEST_F(WorkflowLoadFromDAXTest, LoadValidDAX) {

auto *workflow = new wrench::Workflow();

EXPECT_THROW(workflow->loadFromDAX("bogus"), std::invalid_argument);
EXPECT_NO_THROW(workflow->loadFromDAX(this->dax_file_path));

}
Expand Down
2 changes: 2 additions & 0 deletions test/workflow/WorkflowTaskTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,5 @@ TEST_F(WorkflowTaskTest, StateToString) {
EXPECT_EQ(wrench::WorkflowTask::stateToString(wrench::WorkflowTask::State::COMPLETED), "COMPLETED");
EXPECT_EQ(wrench::WorkflowTask::stateToString(wrench::WorkflowTask::State::FAILED), "FAILED");
}


8 changes: 8 additions & 0 deletions test/workflow/WorkflowTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,11 @@ TEST_F(WorkflowTest, IsDone) {

EXPECT_TRUE(workflow->isDone());
}

TEST_F(WorkflowTest, SumFlops) {

double sum_flops = 0;

EXPECT_NO_THROW(sum_flops = wrench::Workflow::getSumFlops(workflow->getTasks()));
ASSERT_EQ(sum_flops, 4.0);
}

0 comments on commit 16479f7

Please sign in to comment.