Internal changes

PiperOrigin-RevId: 621907514
This commit is contained in:
Richard O'Grady
2024-04-04 17:48:40 +00:00
committed by Danila Kutenin
parent 0212163f6e
commit e1e7329dc7
18 changed files with 83 additions and 391 deletions

View File

@@ -27,7 +27,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <algorithm>
#include <cinttypes>
#include <cmath>
#include <cstdlib>
#include <random>
@@ -485,18 +484,6 @@ TEST(Snappy, MaxBlowup) {
Verify(input);
}
// Issue #201, when output is more than 4GB, we had a data corruption bug.
// We cannot run this test always because of CI constraints.
TEST(Snappy, DISABLED_MoreThan4GB) {
std::mt19937 rng;
std::uniform_int_distribution<int> uniform_byte(0, 255);
std::string input;
input.resize((1ull << 32) - 1);
for (uint64_t i = 0; i < ((1ull << 32) - 1); ++i)
input[i] = static_cast<char>(uniform_byte(rng));
Verify(input);
}
TEST(Snappy, RandomData) {
std::minstd_rand0 rng(snappy::GetFlag(FLAGS_test_random_seed));
std::uniform_int_distribution<int> uniform_0_to_3(0, 3);