Skip to content

Commit

Permalink
Fix merge conflicts from storagetool-add-seqnum branch
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Ivanov <[email protected]>
  • Loading branch information
alexander-e1off committed Dec 3, 2024
2 parents 465e609 + 10b24b5 commit 70ffcb2
Showing 1 changed file with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ static void test2_fromStringTest()
{
bmqtst::TestHelper::printTestName("FROM STRING TEST");

bmqu::MemOutStream errorDescription(s_allocator_p);
bmqu::MemOutStream errorDescription(bmqtst::TestHelperUtil::allocator());

// Valid string
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("123-456", s_allocator_p);
bsl::string inputString("123-456",
bmqtst::TestHelperUtil::allocator());

compositeSeqNum.fromString(errorDescription, inputString);
ASSERT(compositeSeqNum.isSet());
Expand All @@ -90,7 +91,8 @@ static void test2_fromStringTest()
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("00123-000456", s_allocator_p);
bsl::string inputString("00123-000456",
bmqtst::TestHelperUtil::allocator());

compositeSeqNum.fromString(errorDescription, inputString);
ASSERT(compositeSeqNum.isSet());
Expand All @@ -103,7 +105,7 @@ static void test2_fromStringTest()
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("", s_allocator_p);
bsl::string inputString("", bmqtst::TestHelperUtil::allocator());

compositeSeqNum.fromString(errorDescription, inputString);
ASSERT_EQ(compositeSeqNum.isSet(), false);
Expand All @@ -115,7 +117,7 @@ static void test2_fromStringTest()
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("123456", s_allocator_p);
bsl::string inputString("123456", bmqtst::TestHelperUtil::allocator());
errorDescription.reset();

compositeSeqNum.fromString(errorDescription, inputString);
Expand All @@ -129,7 +131,8 @@ static void test2_fromStringTest()
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("123_456", s_allocator_p);
bsl::string inputString("123_456",
bmqtst::TestHelperUtil::allocator());
errorDescription.reset();

compositeSeqNum.fromString(errorDescription, inputString);
Expand All @@ -143,7 +146,8 @@ static void test2_fromStringTest()
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("1a23-456", s_allocator_p);
bsl::string inputString("1a23-456",
bmqtst::TestHelperUtil::allocator());
errorDescription.reset();

compositeSeqNum.fromString(errorDescription, inputString);
Expand All @@ -157,7 +161,8 @@ static void test2_fromStringTest()
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("123-45a6", s_allocator_p);
bsl::string inputString("123-45a6",
bmqtst::TestHelperUtil::allocator());
errorDescription.reset();

compositeSeqNum.fromString(errorDescription, inputString);
Expand All @@ -171,7 +176,7 @@ static void test2_fromStringTest()
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("0-456", s_allocator_p);
bsl::string inputString("0-456", bmqtst::TestHelperUtil::allocator());
errorDescription.reset();

compositeSeqNum.fromString(errorDescription, inputString);
Expand All @@ -185,7 +190,7 @@ static void test2_fromStringTest()
{
CompositeSequenceNumber compositeSeqNum;

bsl::string inputString("123-0", s_allocator_p);
bsl::string inputString("123-0", bmqtst::TestHelperUtil::allocator());
errorDescription.reset();

compositeSeqNum.fromString(errorDescription, inputString);
Expand All @@ -200,7 +205,8 @@ static void test2_fromStringTest()
CompositeSequenceNumber compositeSeqNum;

// Simulate unsigned int overflow
bsl::string inputString("11111111111-123", s_allocator_p);
bsl::string inputString("11111111111-123",
bmqtst::TestHelperUtil::allocator());
errorDescription.reset();

compositeSeqNum.fromString(errorDescription, inputString);
Expand All @@ -215,7 +221,8 @@ static void test2_fromStringTest()
CompositeSequenceNumber compositeSeqNum;

// Simulate bsls::Types::Uint64 overflow
bsl::string inputString("123-111111111111111111111", s_allocator_p);
bsl::string inputString("123-111111111111111111111",
bmqtst::TestHelperUtil::allocator());
errorDescription.reset();

compositeSeqNum.fromString(errorDescription, inputString);
Expand Down Expand Up @@ -311,7 +318,7 @@ int main(int argc, char* argv[])
case 3: test3_comparisonTest(); break;
default: {
cerr << "WARNING: CASE '" << _testCase << "' NOT FOUND." << endl;
s_testStatus = -1;
bmqtst::TestHelperUtil::testStatus() = -1;
} break;
}

Expand Down

0 comments on commit 70ffcb2

Please sign in to comment.