Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'Flag: 0': function(){
assert.eql("42", printf("%0d", 42));
assert.eql("-42", printf("%0d", -42));
assert.eql("00042", printf("%05d", 42));
assert.eql("-00042", printf("%05d", -42));
assert.eql("000000000000042", printf("%015d", 42));
assert.eql("-000000000000042", printf("%015d", -42));
},
'Flag: -': function(){
exports['test equality'] = function(){
var p0 = new Point(1,1);
assert.eql(p0.compare(p0), 0);
};
exports['test add multiple'] = function(){
var bst = new BinarySearchTree();
bst.add(5);
bst.add(10);
assert.eql(2, bst.size(), "Tree should have two items.");
assert.eql(5, bst.value, "First item should have value of 5.");
};
return function(actualSign, actualNumber, actualUnit) {
assert.eql(expectedSign, actualSign);
assert.eql(expectedNumber, actualNumber);
assert.eql(expectedUnit, actualUnit);
}
}
matches = analyzer.analyze({
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "require"
},
"arguments": [
{
"type": "Literal",
"value": null
}
]
}, src);
assert.eql(matches[0].values, ['blah']);
}
}
exports['test should be able to remove first node'] = function(){
var bst = new BinarySearchTree();
bst.add(5);
bst.add(10);
bst.add(6);
bst.remove(5)
assert.eql(2, bst.size(), "Tree should have 2 items.");
assert.eql(10, bst.value, "root should now be 10");
assert.ok(!bst.contains(5));
};