Skip to content

Commit

Permalink
[tests] Check snapshots index
Browse files Browse the repository at this point in the history
  • Loading branch information
ricab committed Oct 23, 2023
1 parent 703c5dc commit 7b5504e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_base_snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,13 @@ TEST_F(TestBaseSnapshot, adopts_custom_metadata)
auto snapshot = MockBaseSnapshot{"snapshot", "", nullptr, specs, vm};
EXPECT_EQ(snapshot.get_metadata(), specs.metadata);
}

TEST_F(TestBaseSnapshot, adopts_next_index)
{
int count = 123;
EXPECT_CALL(vm, get_snapshot_count).WillOnce(Return(count));

auto snapshot = MockBaseSnapshot{"tau", "ceti", nullptr, specs, vm};
EXPECT_EQ(snapshot.get_index(), count + 1);
}
} // namespace

0 comments on commit 7b5504e

Please sign in to comment.