summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-04-09 17:29:16 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2019-04-11 17:01:01 -0400
commit96ad39f93f670e9e09a1e430898e3b9a8bd70f54 (patch)
treeb7a7507e3a25ea36683b8629c4b512abbea53c60 /src/mongo/dbtests
parent7dc8b27f5c34821d24a6751e68da4c62b4545495 (diff)
downloadmongo-96ad39f93f670e9e09a1e430898e3b9a8bd70f54.tar.gz
SERVER-40476 merge contents of utils/stringutils into utils/str.
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r--src/mongo/dbtests/basictests.cpp2
-rw-r--r--src/mongo/dbtests/jsobjtests.cpp12
2 files changed, 8 insertions, 6 deletions
diff --git a/src/mongo/dbtests/basictests.cpp b/src/mongo/dbtests/basictests.cpp
index 6a07c011e69..c6a53840094 100644
--- a/src/mongo/dbtests/basictests.cpp
+++ b/src/mongo/dbtests/basictests.cpp
@@ -35,7 +35,7 @@
#include "mongo/dbtests/dbtests.h"
#include "mongo/util/base64.h"
#include "mongo/util/queue.h"
-#include "mongo/util/stringutils.h"
+#include "mongo/util/str.h"
#include "mongo/util/text.h"
#include "mongo/util/thread_safe_string.h"
#include "mongo/util/timer.h"
diff --git a/src/mongo/dbtests/jsobjtests.cpp b/src/mongo/dbtests/jsobjtests.cpp
index 3ef6d5c2eaf..65b4b142ac1 100644
--- a/src/mongo/dbtests/jsobjtests.cpp
+++ b/src/mongo/dbtests/jsobjtests.cpp
@@ -50,7 +50,7 @@
#include "mongo/util/allocator.h"
#include "mongo/util/embedded_builder.h"
#include "mongo/util/log.h"
-#include "mongo/util/stringutils.h"
+#include "mongo/util/str.h"
#include "mongo/util/timer.h"
namespace mongo {
@@ -126,7 +126,9 @@ BSONObj nested2dotted(const BSONObj& obj) {
return b.obj();
}
-FieldCompareResult compareDottedFieldNames(const string& l, const string& r, const LexNumCmp& cmp) {
+FieldCompareResult compareDottedFieldNames(const string& l,
+ const string& r,
+ const str::LexNumCmp& cmp) {
static int maxLoops = 1024 * 1024;
size_t lstart = 0;
@@ -783,7 +785,7 @@ public:
BSONObj obj = BSON("str" << input);
const string output = obj.firstElement().String();
- ASSERT_EQUALS(escape(output), escape(input)); // for better failure output
+ ASSERT_EQUALS(str::escape(output), str::escape(input)); // for better failure output
ASSERT_EQUALS(output, input);
}
};
@@ -1550,7 +1552,7 @@ public:
class CompareDottedFieldNamesTest {
public:
void t(FieldCompareResult res, const string& l, const string& r) {
- LexNumCmp cmp(true);
+ str::LexNumCmp cmp(true);
ASSERT_EQUALS(res, compareDottedFieldNames(l, r, cmp));
ASSERT_EQUALS(-1 * res, compareDottedFieldNames(r, l, cmp));
}
@@ -1571,7 +1573,7 @@ public:
class CompareDottedArrayFieldNamesTest {
public:
void t(FieldCompareResult res, const string& l, const string& r) {
- LexNumCmp cmp(false); // Specify numeric comparison for array field names.
+ str::LexNumCmp cmp(false); // Specify numeric comparison for array field names.
ASSERT_EQUALS(res, compareDottedFieldNames(l, r, cmp));
ASSERT_EQUALS(-1 * res, compareDottedFieldNames(r, l, cmp));
}