diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-28 13:42:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-28 13:42:19 +0200 |
commit | ca23561dc79d984121c7c3fe91f6e6511034d593 (patch) | |
tree | 58af1507a1eda755a8c5ce2df803f4d15bc78cd1 /searchlib | |
parent | ced5ccdf29cc6785223803f1bcd24b9fd436a358 (diff) | |
parent | 25c4cb05874dbf3176668cb691e1b7c00797e6a0 (diff) |
Merge pull request #21837 from vespa-engine/balder/avoid-multiple-inheritance
Avoid multiple inheritance.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/tests/attribute/attribute_test.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/searchlib/src/tests/attribute/attribute_test.cpp b/searchlib/src/tests/attribute/attribute_test.cpp index 73dd7d2f776..ea8a1649789 100644 --- a/searchlib/src/tests/attribute/attribute_test.cpp +++ b/searchlib/src/tests/attribute/attribute_test.cpp @@ -1514,11 +1514,11 @@ AttributeTest::testMapValueUpdate(const AttributePtr & ptr, BufferType initValue EXPECT_EQUAL(ptr->getStatus().getUpdateCount(), 7u); EXPECT_EQUAL(ptr->getStatus().getNonIdempotentUpdateCount(), 0u); - EXPECT_TRUE(ptr->apply(0, MapVU(initFieldValue, ArithVU(ArithVU::Add, 10)))); - EXPECT_TRUE(ptr->apply(1, MapVU(initFieldValue, ArithVU(ArithVU::Sub, 10)))); - EXPECT_TRUE(ptr->apply(2, MapVU(initFieldValue, ArithVU(ArithVU::Mul, 10)))); - EXPECT_TRUE(ptr->apply(3, MapVU(initFieldValue, ArithVU(ArithVU::Div, 10)))); - EXPECT_TRUE(ptr->apply(6, MapVU(initFieldValue, AssignValueUpdate(IntFieldValue(70))))); + EXPECT_TRUE(ptr->apply(0, MapVU(initFieldValue, std::make_unique<ArithVU>(ArithVU::Add, 10)))); + EXPECT_TRUE(ptr->apply(1, MapVU(initFieldValue, std::make_unique<ArithVU>(ArithVU::Sub, 10)))); + EXPECT_TRUE(ptr->apply(2, MapVU(initFieldValue, std::make_unique<ArithVU>(ArithVU::Mul, 10)))); + EXPECT_TRUE(ptr->apply(3, MapVU(initFieldValue, std::make_unique<ArithVU>(ArithVU::Div, 10)))); + EXPECT_TRUE(ptr->apply(6, MapVU(initFieldValue, std::make_unique<AssignValueUpdate>(IntFieldValue(70))))); ptr->commit(); EXPECT_EQUAL(ptr->getStatus().getUpdateCount(), 12u); EXPECT_EQUAL(ptr->getStatus().getNonIdempotentUpdateCount(), 5u); @@ -1536,7 +1536,7 @@ AttributeTest::testMapValueUpdate(const AttributePtr & ptr, BufferType initValue EXPECT_EQUAL(buf[0].getWeight(), 70); // removeifzero - EXPECT_TRUE(ptr->apply(4, MapVU(initFieldValue, ArithVU(ArithVU::Sub, 100)))); + EXPECT_TRUE(ptr->apply(4, MapVU(initFieldValue, std::make_unique<ArithVU>(ArithVU::Sub, 100)))); ptr->commit(); if (removeIfZero) { EXPECT_EQUAL(ptr->get(4, &buf[0], 2), uint32_t(0)); @@ -1548,7 +1548,7 @@ AttributeTest::testMapValueUpdate(const AttributePtr & ptr, BufferType initValue EXPECT_EQUAL(ptr->getStatus().getNonIdempotentUpdateCount(), 6u); // createifnonexistant - EXPECT_TRUE(ptr->apply(5, MapVU(nonExistant, ArithVU(ArithVU::Add, 10)))); + EXPECT_TRUE(ptr->apply(5, MapVU(nonExistant, std::make_unique<ArithVU>(ArithVU::Add, 10)))); ptr->commit(); if (createIfNonExistant) { EXPECT_EQUAL(ptr->get(5, &buf[0], 2), uint32_t(2)); @@ -1568,7 +1568,7 @@ AttributeTest::testMapValueUpdate(const AttributePtr & ptr, BufferType initValue EXPECT_EQUAL(ptr->getStatus().getUpdateCount(), 15u); ASSERT_TRUE(vec.append(0, initValue.getValue(), 12345)); EXPECT_EQUAL(ptr->getStatus().getUpdateCount(), 16u); - EXPECT_TRUE(ptr->apply(0, MapVU(initFieldValue, ArithVU(ArithVU::Div, 0)))); + EXPECT_TRUE(ptr->apply(0, MapVU(initFieldValue, std::make_unique<ArithVU>(ArithVU::Div, 0)))); EXPECT_EQUAL(ptr->getStatus().getUpdateCount(), 16u); EXPECT_EQUAL(ptr->getStatus().getNonIdempotentUpdateCount(), 7u); ptr->commit(); |