Permalink
Browse files

Travis build fix

  • Loading branch information...
1 parent 25829d2 commit e014048516e25f5bb935aa973eed9c7139a4b57c @christkv christkv committed Aug 27, 2012
Showing with 36 additions and 36 deletions.
  1. +2 −2 .travis.yml
  2. +1 −1 test/node/bson_parser_comparision_test.js
  3. +33 −33 test/node/test_full_bson.js
View
@@ -1,5 +1,5 @@
language: node_js
node_js:
- - 0.4
- 0.6
- - 0.7 # development version of 0.8, may be unstable
+ - 0.8
+ - 0.9 # development version of 0.8, may be unstable
@@ -2,7 +2,7 @@ var sys = require('util'),
debug = require('util').debug,
inspect = require('util').inspect,
Buffer = require('buffer').Buffer,
- BSON = require('../../ext/bson').BSON,
+ BSON = require('../../ext/build/Release/bson').BSON,
Buffer = require('buffer').Buffer,
BSONJS = require('../../lib/bson/bson').BSON,
BinaryParser = require('../../lib/bson/binary_parser').BinaryParser,
@@ -1,20 +1,20 @@
var sys = require('util'),
fs = require('fs'),
Buffer = require('buffer').Buffer,
- BSON = require('../../ext/bson').BSON,
+ BSON = require('../../ext/build/Release/bson').BSON,
Buffer = require('buffer').Buffer,
BSONJS = require('../../lib/bson/bson').BSON,
BinaryParser = require('../../lib/bson/binary_parser').BinaryParser,
Long = require('../../lib/bson/long').Long,
ObjectID = require('../../lib/bson/bson').ObjectID,
Binary = require('../../lib/bson/bson').Binary,
- Code = require('../../lib/bson/bson').Code,
- DBRef = require('../../lib/bson/bson').DBRef,
- Symbol = require('../../lib/bson/bson').Symbol,
- Double = require('../../lib/bson/bson').Double,
- MaxKey = require('../../lib/bson/bson').MaxKey,
- MinKey = require('../../lib/bson/bson').MinKey,
- Timestamp = require('../../lib/bson/bson').Timestamp,
+ Code = require('../../lib/bson/bson').Code,
+ DBRef = require('../../lib/bson/bson').DBRef,
+ Symbol = require('../../lib/bson/bson').Symbol,
+ Double = require('../../lib/bson/bson').Double,
+ MaxKey = require('../../lib/bson/bson').MaxKey,
+ MinKey = require('../../lib/bson/bson').MinKey,
+ Timestamp = require('../../lib/bson/bson').Timestamp,
gleak = require('../../tools/gleak'),
assert = require('assert');
@@ -25,7 +25,7 @@ var bsonJS = new BSONJS([Long, ObjectID, Binary, Code, DBRef, Symbol, Double, Ti
/**
* Retrieve the server information for the current
* instance of the db client
- *
+ *
* @ignore
*/
exports.setUp = function(callback) {
@@ -35,7 +35,7 @@ exports.setUp = function(callback) {
/**
* Retrieve the server information for the current
* instance of the db client
- *
+ *
* @ignore
*/
exports.tearDown = function(callback) {
@@ -45,7 +45,7 @@ exports.tearDown = function(callback) {
/**
* @ignore
*/
-exports['Should Correctly Deserialize object'] = function(test) {
+exports['Should Correctly Deserialize object'] = function(test) {
var bytes = [95,0,0,0,2,110,115,0,42,0,0,0,105,110,116,101,103,114,97,116,105,111,110,95,116,101,115,116,115,95,46,116,101,115,116,95,105,110,100,101,120,95,105,110,102,111,114,109,97,116,105,111,110,0,8,117,110,105,113,117,101,0,0,3,107,101,121,0,12,0,0,0,16,97,0,1,0,0,0,0,2,110,97,109,101,0,4,0,0,0,97,95,49,0,0];
var serialized_data = '';
// Convert to chars
@@ -63,14 +63,14 @@ exports['Should Correctly Deserialize object'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Deserialize object with all types'] = function(test) {
+exports['Should Correctly Deserialize object with all types'] = function(test) {
var bytes = [26,1,0,0,7,95,105,100,0,161,190,98,75,118,169,3,0,0,3,0,0,4,97,114,114,97,121,0,26,0,0,0,16,48,0,1,0,0,0,16,49,0,2,0,0,0,16,50,0,3,0,0,0,0,2,115,116,114,105,110,103,0,6,0,0,0,104,101,108,108,111,0,3,104,97,115,104,0,19,0,0,0,16,97,0,1,0,0,0,16,98,0,2,0,0,0,0,9,100,97,116,101,0,161,190,98,75,0,0,0,0,7,111,105,100,0,161,190,98,75,90,217,18,0,0,1,0,0,5,98,105,110,97,114,121,0,7,0,0,0,2,3,0,0,0,49,50,51,16,105,110,116,0,42,0,0,0,1,102,108,111,97,116,0,223,224,11,147,169,170,64,64,11,114,101,103,101,120,112,0,102,111,111,98,97,114,0,105,0,8,98,111,111,108,101,97,110,0,1,15,119,104,101,114,101,0,25,0,0,0,12,0,0,0,116,104,105,115,46,120,32,61,61,32,51,0,5,0,0,0,0,3,100,98,114,101,102,0,37,0,0,0,2,36,114,101,102,0,5,0,0,0,116,101,115,116,0,7,36,105,100,0,161,190,98,75,2,180,1,0,0,2,0,0,0,10,110,117,108,108,0,0];
var serialized_data = '';
// Convert to chars
for(var i = 0; i < bytes.length; i++) {
serialized_data = serialized_data + BinaryParser.fromByte(bytes[i]);
}
-
+
var object = bsonJS.deserialize(new Buffer(serialized_data, 'binary'));
assert.equal("hello", object.string);
assert.deepEqual([1, 2, 3], object.array);
@@ -92,7 +92,7 @@ exports['Should Correctly Deserialize object with all types'] = function(test) {
/**
* @ignore
*/
-exports['Should Serialize and Deserialize String'] = function(test) {
+exports['Should Serialize and Deserialize String'] = function(test) {
var test_string = {hello: 'world'}
var serialized_data = bsonC.serialize(test_string)
assert.deepEqual(test_string, bsonC.deserialize(serialized_data));
@@ -102,7 +102,7 @@ exports['Should Serialize and Deserialize String'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Integer'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Integer'] = function(test) {
var test_number = {doc: 5}
var serialized_data = bsonC.serialize(test_number)
assert.deepEqual(test_number, bsonC.deserialize(serialized_data));
@@ -112,7 +112,7 @@ exports['Should Correctly Serialize and Deserialize Integer'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize null value'] = function(test) {
+exports['Should Correctly Serialize and Deserialize null value'] = function(test) {
var test_null = {doc:null}
var serialized_data = bsonC.serialize(test_null)
var object = bsonC.deserialize(serialized_data);
@@ -123,7 +123,7 @@ exports['Should Correctly Serialize and Deserialize null value'] = function(test
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize undefined value'] = function(test) {
+exports['Should Correctly Serialize and Deserialize undefined value'] = function(test) {
var test_undefined = {doc:undefined}
var serialized_data = bsonC.serialize(test_undefined)
var object = bsonJS.deserialize(new Buffer(serialized_data, 'binary'));
@@ -134,7 +134,7 @@ exports['Should Correctly Serialize and Deserialize undefined value'] = function
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Number'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Number'] = function(test) {
var test_number = {doc: 5.5}
var serialized_data = bsonC.serialize(test_number)
assert.deepEqual(test_number, bsonC.deserialize(serialized_data));
@@ -144,19 +144,19 @@ exports['Should Correctly Serialize and Deserialize Number'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Integer'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Integer'] = function(test) {
var test_int = {doc: 42}
var serialized_data = bsonC.serialize(test_int)
assert.deepEqual(test_int, bsonC.deserialize(serialized_data));
-
+
test_int = {doc: -5600}
serialized_data = bsonC.serialize(test_int)
assert.deepEqual(test_int, bsonC.deserialize(serialized_data));
-
+
test_int = {doc: 2147483647}
serialized_data = bsonC.serialize(test_int)
assert.deepEqual(test_int, bsonC.deserialize(serialized_data));
-
+
test_int = {doc: -2147483648}
serialized_data = bsonC.serialize(test_int)
assert.deepEqual(test_int, bsonC.deserialize(serialized_data));
@@ -166,7 +166,7 @@ exports['Should Correctly Serialize and Deserialize Integer'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Object'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Object'] = function(test) {
var doc = {doc: {age: 42, name: 'Spongebob', shoe_size: 9.5}}
var serialized_data = bsonC.serialize(doc)
assert.deepEqual(doc, bsonC.deserialize(serialized_data));
@@ -176,7 +176,7 @@ exports['Should Correctly Serialize and Deserialize Object'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Array'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Array'] = function(test) {
var doc = {doc: [1, 2, 'a', 'b']}
var serialized_data = bsonC.serialize(doc)
assert.deepEqual(doc, bsonC.deserialize(serialized_data));
@@ -186,7 +186,7 @@ exports['Should Correctly Serialize and Deserialize Array'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Array with added on functions'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Array with added on functions'] = function(test) {
var doc = {doc: [1, 2, 'a', 'b']}
var serialized_data = bsonC.serialize(doc)
assert.deepEqual(doc, bsonC.deserialize(serialized_data));
@@ -196,7 +196,7 @@ exports['Should Correctly Serialize and Deserialize Array with added on function
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize A Boolean'] = function(test) {
+exports['Should Correctly Serialize and Deserialize A Boolean'] = function(test) {
var doc = {doc: true}
var serialized_data = bsonC.serialize(doc)
assert.deepEqual(doc, bsonC.deserialize(serialized_data));
@@ -206,7 +206,7 @@ exports['Should Correctly Serialize and Deserialize A Boolean'] = function(test)
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize a Date'] = function(test) {
+exports['Should Correctly Serialize and Deserialize a Date'] = function(test) {
var date = new Date()
//(2009, 11, 12, 12, 00, 30)
date.setUTCDate(12)
@@ -224,7 +224,7 @@ exports['Should Correctly Serialize and Deserialize a Date'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Oid'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Oid'] = function(test) {
var doc = {doc: new ObjectID()}
var serialized_data = bsonC.serialize(doc)
assert.deepEqual(doc.doc.toHexString(), bsonC.deserialize(serialized_data).doc.toHexString())
@@ -234,7 +234,7 @@ exports['Should Correctly Serialize and Deserialize Oid'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly encode Empty Hash'] = function(test) {
+exports['Should Correctly encode Empty Hash'] = function(test) {
var test_code = {}
var serialized_data = bsonC.serialize(test_code)
assert.deepEqual(test_code, bsonC.deserialize(serialized_data));
@@ -244,7 +244,7 @@ exports['Should Correctly encode Empty Hash'] = function(test) {
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Ordered Hash'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Ordered Hash'] = function(test) {
var doc = {doc: {b:1, a:2, c:3, d:4}}
var serialized_data = bsonC.serialize(doc)
var decoded_hash = bsonC.deserialize(serialized_data).doc
@@ -257,7 +257,7 @@ exports['Should Correctly Serialize and Deserialize Ordered Hash'] = function(te
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize Regular Expression'] = function(test) {
+exports['Should Correctly Serialize and Deserialize Regular Expression'] = function(test) {
var doc = {doc: /foobar/mi}
var serialized_data = bsonC.serialize(doc)
var doc2 = bsonC.deserialize(serialized_data);
@@ -268,7 +268,7 @@ exports['Should Correctly Serialize and Deserialize Regular Expression'] = funct
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize a Binary object'] = function(test) {
+exports['Should Correctly Serialize and Deserialize a Binary object'] = function(test) {
var bin = new Binary()
var string = 'binstring'
for(var index = 0; index < string.length; index++) {
@@ -284,7 +284,7 @@ exports['Should Correctly Serialize and Deserialize a Binary object'] = function
/**
* @ignore
*/
-exports['Should Correctly Serialize and Deserialize a big Binary object'] = function(test) {
+exports['Should Correctly Serialize and Deserialize a big Binary object'] = function(test) {
var data = fs.readFileSync("test/node/data/test_gs_weird_bug.png", 'binary');
var bin = new Binary()
bin.write(data)

0 comments on commit e014048

Please sign in to comment.