moved equalBuffers to test-helper
This commit is contained in:
parent
2fc0d1124a
commit
d0a98ce129
@ -11,6 +11,21 @@ assert.same = function(actual, expected) {
|
||||
}
|
||||
};
|
||||
|
||||
assert.equalBuffers = function(actual, expected) {
|
||||
if(actual.length != expected.length) {
|
||||
console.log(actual);
|
||||
console.log(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);
|
||||
}
|
||||
assert.equal(actual[i],expected[i]);
|
||||
}
|
||||
};
|
||||
|
||||
assert.empty = function(actual) {
|
||||
assert.length(actual, 0);
|
||||
};
|
||||
|
@ -1,21 +1,6 @@
|
||||
require(__dirname + "/test-helper");
|
||||
|
||||
|
||||
assert.equalBuffers = function(actual, expected) {
|
||||
if(actual.length != expected.length) {
|
||||
console.log(actual);
|
||||
console.log(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);
|
||||
}
|
||||
assert.equal(actual[i],expected[i]);
|
||||
}
|
||||
}
|
||||
|
||||
BufferList.prototype.compare = function(expected) {
|
||||
var buf = this.join();
|
||||
assert.equalBuffers(buf, expected);
|
||||
|
Loading…
Reference in New Issue
Block a user