summaryrefslogtreecommitdiff
path: root/dbtests/basictests.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-12-18 23:34:26 -0500
committerEliot Horowitz <eliot@10gen.com>2010-12-18 23:34:26 -0500
commitfadf89d82409085cfa20d7f6360a932fa5932c13 (patch)
tree59846dda50c0a021f7ce9f45bdb7f56028d1e51b /dbtests/basictests.cpp
parentfba685096f26d37d73155a20e97cc85cc21035ab (diff)
downloadmongo-fadf89d82409085cfa20d7f6360a932fa5932c13.tar.gz
!= operator for HostAndPort
Diffstat (limited to 'dbtests/basictests.cpp')
-rw-r--r--dbtests/basictests.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/dbtests/basictests.cpp b/dbtests/basictests.cpp
index 76a2b3c94d0..abefe1a0225 100644
--- a/dbtests/basictests.cpp
+++ b/dbtests/basictests.cpp
@@ -536,6 +536,21 @@ namespace BasicTests {
}
};
+
+ class HostAndPortTests {
+ public:
+ void run(){
+ HostAndPort a( "x1" , 1000 );
+ HostAndPort b( "x1" , 1000 );
+ HostAndPort c( "x1" , 1001 );
+ HostAndPort d( "x2" , 1000 );
+
+ ASSERT( a == b );
+ ASSERT( a != c );
+ ASSERT( a != d );
+
+ }
+ };
class All : public Suite {
public:
@@ -568,6 +583,8 @@ namespace BasicTests {
add< QueueTest >();
add< StrTests >();
+
+ add< HostAndPortTests >();
}
} myall;