summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts/fts_index_format_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/fts/fts_index_format_test.cpp')
-rw-r--r--src/mongo/db/fts/fts_index_format_test.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/mongo/db/fts/fts_index_format_test.cpp b/src/mongo/db/fts/fts_index_format_test.cpp
index af353d51f26..03eb7406a79 100644
--- a/src/mongo/db/fts/fts_index_format_test.cpp
+++ b/src/mongo/db/fts/fts_index_format_test.cpp
@@ -36,9 +36,9 @@
#include "mongo/db/fts/fts_index_format.h"
#include "mongo/db/fts/fts_spec.h"
+#include "mongo/unittest/unittest.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
-#include "mongo/unittest/unittest.h"
namespace mongo {
@@ -67,12 +67,14 @@ TEST(FTSIndexFormat, Simple1) {
TEST(FTSIndexFormat, ExtraBack1) {
FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data"
<< "text"
- << "x" << 1)))));
+ << "x"
+ << 1)))));
BSONObjSet keys;
FTSIndexFormat::getKeys(spec,
BSON("data"
<< "cat"
- << "x" << 5),
+ << "x"
+ << 5),
&keys);
ASSERT_EQUALS(1U, keys.size());
@@ -91,7 +93,8 @@ TEST(FTSIndexFormat, ExtraFront1) {
FTSIndexFormat::getKeys(spec,
BSON("data"
<< "cat"
- << "x" << 5),
+ << "x"
+ << 5),
&keys);
ASSERT_EQUALS(1U, keys.size());
@@ -152,9 +155,10 @@ void assertEqualsIndexKeys(std::set<std::string>& expectedKeys, const BSONObjSet
* Terms that are too long are not truncated in version 1.
*/
TEST(FTSIndexFormat, LongWordsTextIndexVersion1) {
- FTSSpec spec(
- assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data"
- << "text") << "textIndexVersion" << 1))));
+ FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data"
+ << "text")
+ << "textIndexVersion"
+ << 1))));
BSONObjSet keys;
string longPrefix(1024U, 'a');
// "aaa...aaacat"
@@ -181,9 +185,10 @@ TEST(FTSIndexFormat, LongWordsTextIndexVersion1) {
* characters of the term to form the index key.
*/
TEST(FTSIndexFormat, LongWordTextIndexVersion2) {
- FTSSpec spec(
- assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data"
- << "text") << "textIndexVersion" << 2))));
+ FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data"
+ << "text")
+ << "textIndexVersion"
+ << 2))));
BSONObjSet keys;
string longPrefix(1024U, 'a');
// "aaa...aaacat"
@@ -215,9 +220,10 @@ TEST(FTSIndexFormat, LongWordTextIndexVersion2) {
* characters of the term to form the index key.
*/
TEST(FTSIndexFormat, LongWordTextIndexVersion3) {
- FTSSpec spec(
- assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data"
- << "text") << "textIndexVersion" << 3))));
+ FTSSpec spec(assertGet(FTSSpec::fixSpec(BSON("key" << BSON("data"
+ << "text")
+ << "textIndexVersion"
+ << 3))));
BSONObjSet keys;
string longPrefix(1024U, 'a');
// "aaa...aaacat"