diff options
Diffstat (limited to 'src/mongo/bson/bson_validate_test.cpp')
-rw-r--r-- | src/mongo/bson/bson_validate_test.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/mongo/bson/bson_validate_test.cpp b/src/mongo/bson/bson_validate_test.cpp index e7d8e14ad70..547ff21572e 100644 --- a/src/mongo/bson/bson_validate_test.cpp +++ b/src/mongo/bson/bson_validate_test.cpp @@ -34,6 +34,7 @@ #include "mongo/base/data_view.h" #include "mongo/bson/bson_validate.h" #include "mongo/db/jsobj.h" +#include "mongo/logv2/log.h" #include "mongo/platform/random.h" #include "mongo/unittest/unittest.h" #include "mongo/util/log.h" @@ -94,9 +95,12 @@ TEST(BSONValidate, RandomData) { delete[] x; } - log() << "RandomData: didn't crash valid/total: " << numValid << "/" << numToRun - << " (want few valid ones)" - << " jsonSize: " << jsonSize << endl; + LOGV2(20104, + "RandomData: didn't crash valid/total: {numValid}/{numToRun} (want few valid ones) " + "jsonSize: {jsonSize}", + "numValid"_attr = numValid, + "numToRun"_attr = numToRun, + "jsonSize"_attr = jsonSize); } TEST(BSONValidate, MuckingData1) { @@ -140,14 +144,17 @@ TEST(BSONValidate, MuckingData1) { } } - log() << "MuckingData1: didn't crash valid/total: " << numValid << "/" << numToRun - << " (want few valid ones) " - << " jsonSize: " << jsonSize << endl; + LOGV2(20105, + "MuckingData1: didn't crash valid/total: {numValid}/{numToRun} (want few valid ones) " + "jsonSize: {jsonSize}", + "numValid"_attr = numValid, + "numToRun"_attr = numToRun, + "jsonSize"_attr = jsonSize); } TEST(BSONValidate, Fuzz) { int64_t seed = time(nullptr); - log() << "BSONValidate Fuzz random seed: " << seed << endl; + LOGV2(20106, "BSONValidate Fuzz random seed: {seed}", "seed"_attr = seed); PseudoRandom randomSource(seed); BSONObj original = |