updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
@@ -150,8 +150,9 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
ASSERT_TRUE(utils::encryption::read_encrypted_range(range, key, uses_kdf,
|
||||
reader, total_size, out));
|
||||
|
||||
std::vector<unsigned char> want(plain.begin() + begin,
|
||||
plain.begin() + end + 1U);
|
||||
std::vector<unsigned char> want(
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin),
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(end) + 1U);
|
||||
EXPECT_EQ(out, want);
|
||||
}
|
||||
|
||||
@@ -168,8 +169,9 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
ASSERT_TRUE(utils::encryption::read_encrypted_range(range, key, uses_kdf,
|
||||
reader, total_size, out));
|
||||
|
||||
std::vector<unsigned char> want(plain.begin() + begin,
|
||||
plain.begin() + end + 1U);
|
||||
std::vector<unsigned char> want(
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin),
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(end) + 1U);
|
||||
EXPECT_EQ(out, want);
|
||||
}
|
||||
|
||||
@@ -186,8 +188,9 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
ASSERT_TRUE(utils::encryption::read_encrypted_range(range, key, uses_kdf,
|
||||
reader, total_size, out));
|
||||
|
||||
std::vector<unsigned char> want(plain.begin() + begin,
|
||||
plain.begin() + end + 1U);
|
||||
std::vector<unsigned char> want(
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin),
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(end) + 1U);
|
||||
EXPECT_EQ(out, want);
|
||||
}
|
||||
|
||||
@@ -203,8 +206,9 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
ASSERT_TRUE(utils::encryption::read_encrypted_range(range, key, uses_kdf,
|
||||
reader, total_size, out));
|
||||
|
||||
std::vector<unsigned char> want(plain.begin() + begin,
|
||||
plain.begin() + end + 1U);
|
||||
std::vector<unsigned char> want(
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin),
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(end) + 1U);
|
||||
EXPECT_EQ(out, want);
|
||||
}
|
||||
|
||||
@@ -239,8 +243,9 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
bytes_read));
|
||||
EXPECT_EQ(bytes_read, sink.size());
|
||||
|
||||
std::vector<unsigned char> want(plain.begin() + begin,
|
||||
plain.begin() + end + 1U);
|
||||
std::vector<unsigned char> want(
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin),
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(end) + 1U);
|
||||
EXPECT_TRUE(std::equal(sink.begin(), sink.end(), want.begin(), want.end()));
|
||||
}
|
||||
|
||||
@@ -338,7 +343,7 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
std::uint64_t begin = static_cast<std::uint64_t>(chunk);
|
||||
std::uint64_t end = begin + 1024U - 1U;
|
||||
if (end >= plain_sz)
|
||||
end = (std::uint64_t)plain_sz - 1U;
|
||||
end = static_cast<std::uint64_t>(plain_sz) - 1U;
|
||||
ASSERT_GE(end, begin);
|
||||
|
||||
http_range range{begin, end};
|
||||
@@ -346,8 +351,9 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
|
||||
ASSERT_TRUE(utils::encryption::read_encrypted_range(range, key, uses_kdf,
|
||||
reader, total_size, out));
|
||||
std::vector<unsigned char> want(plain.begin() + begin,
|
||||
plain.begin() + end + 1U);
|
||||
std::vector<unsigned char> want(
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin),
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(end) + 1U);
|
||||
EXPECT_EQ(out, want);
|
||||
}
|
||||
|
||||
@@ -388,7 +394,8 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
range, key, uses_kdf, reader, total_size, sink.data(), sink.size(),
|
||||
bytes_read));
|
||||
EXPECT_EQ(bytes_read, sink.size());
|
||||
EXPECT_TRUE(std::equal(sink.begin(), sink.end(), plain.begin() + begin));
|
||||
EXPECT_TRUE(std::equal(sink.begin(), sink.end(),
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin)));
|
||||
}
|
||||
|
||||
TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
@@ -403,8 +410,9 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
|
||||
std::size_t expected_len =
|
||||
static_cast<std::size_t>(static_cast<std::uint64_t>(plain_sz) - begin);
|
||||
std::vector<unsigned char> want(plain.begin() + begin,
|
||||
plain.begin() + plain_sz);
|
||||
std::vector<unsigned char> want(
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin),
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(plain_sz));
|
||||
ASSERT_EQ(out.size(), expected_len);
|
||||
EXPECT_EQ(out, want);
|
||||
|
||||
@@ -414,8 +422,8 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
range, key, uses_kdf, reader, total_size, buf.data(), buf.size(),
|
||||
bytes_read));
|
||||
EXPECT_EQ(bytes_read, std::min<std::size_t>(buf.size(), expected_len));
|
||||
EXPECT_TRUE(
|
||||
std::equal(buf.begin(), buf.begin() + bytes_read, plain.begin() + begin));
|
||||
EXPECT_TRUE(std::equal(buf.begin(), buf.begin() + bytes_read,
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin)));
|
||||
}
|
||||
|
||||
TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
@@ -433,8 +441,8 @@ TEST_P(utils_encryption_read_encrypted_range_fixture,
|
||||
range, key, uses_kdf, reader, total_size, buf.data(), buf.size(),
|
||||
bytes_read));
|
||||
EXPECT_EQ(bytes_read, 64U);
|
||||
EXPECT_TRUE(
|
||||
std::equal(buf.begin(), buf.begin() + 64U, plain.begin() + begin));
|
||||
EXPECT_TRUE(std::equal(buf.begin(), buf.begin() + 64U,
|
||||
plain.begin() + static_cast<std::ptrdiff_t>(begin)));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(no_kdf_and_kdf,
|
||||
|
Reference in New Issue
Block a user