Skip to content

Commit

Permalink
[tests] Check snapshot comment from JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
ricab committed Nov 15, 2023
1 parent f81fee8 commit adadffd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_base_snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,14 @@ TEST_F(TestBaseSnapshot, adopts_name_from_json)
EXPECT_EQ(snapshot.get_name(), snapshot_name);
}

TEST_F(TestBaseSnapshot, adopts_comment_from_json)
{
constexpr auto* snapshot_comment = "Look behind you, a three-headed monkey!";
auto json = test_snapshot_json();
mod_snapshot_json(json, "comment", snapshot_comment);

auto snapshot = MockBaseSnapshot{plant_snapshot_json(json), vm};
EXPECT_EQ(snapshot.get_comment(), snapshot_comment);
}

} // namespace

0 comments on commit adadffd

Please sign in to comment.