@ -259,7 +259,7 @@ test('Integration test gasCosts.js', function (t) {
'forgottenReturn.sol': 3,
'selfdestruct.sol': 0,
'deleteDynamicArray.sol': 2,
'deleteFromDynamicArray.sol': 2,
'deleteFromDynamicArray.sol': 1,
'blockLevelCompare.sol': 1,
'intDivisionTruncate.sol': 1,
'ERC20.sol': 2,
@ -6,7 +6,8 @@ contract arr {
return array;
}
function safeRemoveAtIndex(uint index) returns (uint[]) {
// TODO: deleteFromDynamicArray should not generate warnings if array item is shifted and removed
/* function safeRemoveAtIndex(uint index) returns (uint[]) {
if (index >= array.length) return;
for (uint i = index; i < array.length-1; i++) {
@ -17,5 +18,5 @@ contract arr {
array.length--;
} */
@ -6,7 +6,8 @@ contract forLoopArr {
function shiftArrItem(uint index) returns(uint[]) {
// TODO: for (uint i = index; i < array.length-1; i++) should also generate warning
for (uint i = index; i < array.length; i++) {
array[i] = array[i+1];