summaryrefslogtreecommitdiff
path: root/jstests/geo4.js
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2010-03-25 19:21:32 +0100
committerAntonin Kral <a.kral@bobek.cz>2010-03-25 19:21:32 +0100
commit0ca01a91ae0a3562e54c226e7b9512feb2ea83d0 (patch)
tree2b3886e435b0217d6afd63a213b04d32bb4b4f6f /jstests/geo4.js
parenta696359b248adef0cc8576fce3f473535e995136 (diff)
downloadmongodb-0ca01a91ae0a3562e54c226e7b9512feb2ea83d0.tar.gz
Imported Upstream version 1.4.0
Diffstat (limited to 'jstests/geo4.js')
-rw-r--r--jstests/geo4.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/geo4.js b/jstests/geo4.js
new file mode 100644
index 0000000..73b4020
--- /dev/null
+++ b/jstests/geo4.js
@@ -0,0 +1,10 @@
+var t = db.geo4;
+t.drop();
+
+t.insert( { zip : "06525" , loc : [ 41.352964 , 73.01212 ] } );
+
+t.ensureIndex( { loc : "2d" }, { bits : 33 } );
+assert.eq( db.getLastError() , "can't have more than 32 bits in geo index" , "a" );
+
+t.ensureIndex( { loc : "2d" }, { bits : 32 } );
+assert( !db.getLastError(), "b" );