diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-10-15 18:06:56 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-10-15 18:07:07 -0400 |
commit | 7121e49ecb8a047d1c9fc1015cfd08813ec5e63e (patch) | |
tree | 781cfc5a847bcf310fc99e31d04931045a3a136f /src | |
parent | c3ab85bc817ecea7f1591a7c200f79e6d5fab17b (diff) | |
download | mongo-7121e49ecb8a047d1c9fc1015cfd08813ec5e63e.tar.gz |
more namespace db comparisons
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/namespacestring_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/namespacestring_test.cpp b/src/mongo/db/namespacestring_test.cpp index f49bf2fe2fb..c9ae32c7f36 100644 --- a/src/mongo/db/namespacestring_test.cpp +++ b/src/mongo/db/namespacestring_test.cpp @@ -56,9 +56,20 @@ namespace mongo { testEqualsBothWays( "foo.a" , "foo.a" ); testEqualsBothWays( "foo.a" , "foo.b" ); + testEqualsBothWays( "" , "" ); + testEqualsBothWays( "" , "." ); + testEqualsBothWays( "" , ".x" ); + testNotEqualsBothWays( "foo" , "bar" ); testNotEqualsBothWays( "foo" , "food" ); testNotEqualsBothWays( "foo." , "food" ); + + testNotEqualsBothWays( "" , "x" ); + testNotEqualsBothWays( "" , "x." ); + testNotEqualsBothWays( "" , "x.y" ); + testNotEqualsBothWays( "." , "x" ); + testNotEqualsBothWays( "." , "x." ); + testNotEqualsBothWays( "." , "x.y" ); } } |