1
// sharding.cpp : some unit tests for sharding internals
4
* Copyright (C) 2009 10gen Inc.
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Affero General Public License, version 3,
8
* as published by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Affero General Public License for more details.
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
#include "../client/parallel.h"
25
namespace ShardingTests {
27
namespace serverandquerytests {
31
ServerAndQuery a( "foo:1" , BSON( "a" << GT << 0 << LTE << 100 ) );
32
ServerAndQuery b( "foo:1" , BSON( "a" << GT << 200 << LTE << 1000 ) );
35
ASSERT( ! ( b < a ) );
37
set<ServerAndQuery> s;
41
ASSERT_EQUALS( (unsigned int)2 , s.size() );
46
class All : public Suite {
48
All() : Suite( "sharding" ){
52
add< serverandquerytests::test1 >();