Add absl::GetFlag and absl::SetFlag to uses of flags.
PiperOrigin-RevId: 357807059
This commit is contained in:
committed by
Victor Costan
parent
ea368c2f07
commit
453942b38f
@@ -461,7 +461,7 @@ TEST(Snappy, MaxBlowup) {
|
||||
}
|
||||
|
||||
TEST(Snappy, RandomData) {
|
||||
std::minstd_rand0 rng(FLAGS_test_random_seed);
|
||||
std::minstd_rand0 rng(absl::GetFlag(FLAGS_test_random_seed));
|
||||
std::uniform_int_distribution<int> uniform_0_to_3(0, 3);
|
||||
std::uniform_int_distribution<int> uniform_0_to_8(0, 8);
|
||||
std::uniform_int_distribution<int> uniform_byte(0, 255);
|
||||
@@ -834,7 +834,7 @@ TEST(Snappy, FindMatchLength) {
|
||||
TEST(Snappy, FindMatchLengthRandom) {
|
||||
constexpr int kNumTrials = 10000;
|
||||
constexpr int kTypicalLength = 10;
|
||||
std::minstd_rand0 rng(FLAGS_test_random_seed);
|
||||
std::minstd_rand0 rng(absl::GetFlag(FLAGS_test_random_seed));
|
||||
std::uniform_int_distribution<int> uniform_byte(0, 255);
|
||||
std::bernoulli_distribution one_in_two(1.0 / 2);
|
||||
std::bernoulli_distribution one_in_typical_length(1.0 / kTypicalLength);
|
||||
@@ -938,7 +938,7 @@ TEST(Snappy, VerifyCharTable) {
|
||||
EXPECT_NE(0xffff, dst[i]) << "Did not assign byte " << i;
|
||||
}
|
||||
|
||||
if (FLAGS_snappy_dump_decompression_table) {
|
||||
if (absl::GetFlag(FLAGS_snappy_dump_decompression_table)) {
|
||||
std::printf("static const uint16_t char_table[256] = {\n ");
|
||||
for (int i = 0; i < 256; ++i) {
|
||||
std::printf("0x%04x%s",
|
||||
|
||||
Reference in New Issue
Block a user