add test

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 81ebd868
......@@ -138,6 +138,20 @@ function assertNoEntry(codeMap, addr) {
})();
(function testDeadCodeCleanups() {
var codeMap = new CodeMap();
codeMap.addCode(0x1500, newCodeEntry(0x200, 'code1'));
codeMap.addCode(0x1700, newCodeEntry(0x100, 'code2'));
assertEntry(codeMap, 'code1', 0x1500);
assertEntry(codeMap, 'code2', 0x1700);
codeMap.moveCode(0x1500, 0x1700); // Deprecate code2.
assertEntry(codeMap, 'code1', 0x1700);
codeMap.addCode(0x1750, newCodeEntry(0x100, 'code3'));
assertNoEntry(codeMap, 0x1700);
assertEntry(codeMap, 'code3', 0x1750);
})();
(function testDynamicNamesDuplicates() {
var codeMap = new CodeMap();
// Code entries with same names but different addresses.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment