diff --git a/test/test-helper.js b/test/test-helper.js index fbeaa4d..9f2a4ff 100644 --- a/test/test-helper.js +++ b/test/test-helper.js @@ -64,18 +64,21 @@ assert.UTCDate = function(actual, year, month, day, hours, min, sec, milisecond) assert.equal(actualMili, milisecond, "expected milisecond " + milisecond + " but got " + actualMili); }; +var spit = function(actual, expected) { + console.log(""); + console.log("actual " + sys.inspect(actual)); + console.log("expect " + sys.inspect(expected)); + console.log(""); +} + assert.equalBuffers = function(actual, expected) { if(actual.length != expected.length) { - console.log(""); - console.log("actual " + sys.inspect(actual)); - console.log("expect " + sys.inspect(expected)); - console.log(""); + spit(actual, expected) assert.equal(actual.length, expected.length); } for(var i = 0; i < actual.length; i++) { if(actual[i] != expected[i]) { - console.log(actual); - console.log(expected); + spit(actual, expected) } assert.equal(actual[i],expected[i]); }