Skip to content

Commit 57b40cc

Browse files
trondnudkyo
authored andcommitted
CBD-6348: [BP] Fix ambiguous == operator in unit test
By casting to DocKey error: use of overloaded operator '==' is ambiguous (with operand types 'const StoredDocKeyT<std::allocator>' and 'const SerialisedDocKey') Change-Id: If722de4964d2806745056924aaeb37cb008b6acc Reviewed-on: https://review.couchbase.org/c/kv_engine/+/234980 Reviewed-by: Trond Norbye <[email protected]> Well-Formed: Restriction Checker Tested-by: Trond Norbye <[email protected]>
1 parent 0702bb0 commit 57b40cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

engines/ep/tests/module_tests/mutation_log_test.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,12 @@ TEST_F(MutationLogTest, upgradeV3toV4) {
666666
}
667667
};
668668

669+
const auto somekey = makeStoredDocKey("somekey");
670+
669671
{
670672
MockMutationLog ml(tmp_log_filename, MutationLogVersion::V3);
671673
ml.open();
672-
ml.newItem(Vbid(3), makeStoredDocKey("somekey"));
674+
ml.newItem(Vbid(3), somekey);
673675
ml.commit1();
674676
ml.commit2();
675677
ml.flush();
@@ -682,7 +684,7 @@ TEST_F(MutationLogTest, upgradeV3toV4) {
682684
ASSERT_EQ(MutationLogVersion::V3, ml.header().version());
683685
auto iter = ml.begin();
684686
EXPECT_EQ(MutationLogType::New, (*iter)->type());
685-
EXPECT_EQ(makeStoredDocKey("somekey"), (*iter)->key());
687+
EXPECT_EQ(static_cast<const DocKey&>(somekey), (*iter)->key());
686688
++iter;
687689
EXPECT_EQ(MutationLogType::Commit1, (*iter)->type());
688690
++iter;

0 commit comments

Comments
 (0)