Skip to content

Commit

Permalink
#2171: Add unit test for user_defined field in json
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Nov 6, 2023
1 parent a923f68 commit 1fefe4f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/collection/test_lb.extended.cc
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@ TEST_P(TestNodeLBDataDumper, test_node_lb_data_dumping_with_interval) {

EXPECT_TRUE(json.find("phases") != json.end());
EXPECT_EQ(json["phases"].size(), num_phases);
for(const auto& phase : json["phases"]){
EXPECT_TRUE(phase.find("user_defined") != phase.end());
EXPECT_TRUE(phase["user_defined"].contains("time"));
EXPECT_EQ(phase["user_defined"]["time"], static_cast<double>(phase["id"]));
}

});

if (vt::theContext()->getNode() == 0) {
Expand Down

0 comments on commit 1fefe4f

Please sign in to comment.