diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2020-04-09 16:29:36 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-20 15:41:45 +0000 |
commit | fccca7a804efdaf008ba859ceeb09d62444b2738 (patch) | |
tree | 15c291a2fb065caa4183b3ccd759c0d4ff3703b6 /src/mongo/db/field_ref_test.cpp | |
parent | 61f5d6cf5087d656ebc4bbd2bf75a0a5eacb9cad (diff) | |
download | mongo-fccca7a804efdaf008ba859ceeb09d62444b2738.tar.gz |
SERVER-47476 Use small_vector to be able to store a few multikey components without allocating memory
Also cleaned up FieldRef
Diffstat (limited to 'src/mongo/db/field_ref_test.cpp')
-rw-r--r-- | src/mongo/db/field_ref_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/field_ref_test.cpp b/src/mongo/db/field_ref_test.cpp index 9a116ccf98b..5c2d679c080 100644 --- a/src/mongo/db/field_ref_test.cpp +++ b/src/mongo/db/field_ref_test.cpp @@ -860,14 +860,14 @@ TEST(NumericPathComponents, CanIdentifyNumericPathComponents) { TEST(NumericPathComponents, CanObtainAllNumericPathComponents) { FieldRef path("a.0.b.1.c.2.d"); - std::set<size_t> expectedComponents{size_t(1), size_t(3), size_t(5)}; + std::set<FieldIndex> expectedComponents{FieldIndex(1), FieldIndex(3), FieldIndex(5)}; auto numericPathComponents = path.getNumericPathComponents(); ASSERT(numericPathComponents == expectedComponents); } TEST(NumericPathComponents, FieldsWithLeadingZeroesAreNotConsideredNumeric) { FieldRef path("a.0.b.01.c.2.d"); - std::set<size_t> expectedComponents{size_t(1), size_t(5)}; + std::set<FieldIndex> expectedComponents{FieldIndex(1), FieldIndex(5)}; auto numericPathComponents = path.getNumericPathComponents(); ASSERT(numericPathComponents == expectedComponents); } |