summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-10-15 18:06:56 -0400
committerEliot Horowitz <eliot@10gen.com>2012-10-15 18:07:07 -0400
commit7121e49ecb8a047d1c9fc1015cfd08813ec5e63e (patch)
tree781cfc5a847bcf310fc99e31d04931045a3a136f /src
parentc3ab85bc817ecea7f1591a7c200f79e6d5fab17b (diff)
downloadmongo-7121e49ecb8a047d1c9fc1015cfd08813ec5e63e.tar.gz
more namespace db comparisons
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/namespacestring_test.cpp11
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" );
}
}