From 56bfbe307d0af3893d8ae445ea3ccfe3f66197a4 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 19 Jul 2017 14:57:46 +0200 Subject: [PATCH] fix test - adapt to last solc change --- package.json | 4 ++-- test/solidity/localsTests/int.js | 12 ++++++------ test/solidity/localsTests/misc2.js | 2 +- test/sourceMappingDecoder.js | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 344f2571a1..779616f7e9 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "http-server": "^0.9.0", "nightwatch": "^0.9.5", "selenium-standalone": "^6.0.1", - "solc": "^0.4.3", + "solc": "^0.4.13", "standard": "^7.0.1", "standard-reporter": "^1.0.5", "tape": "^4.6.0", @@ -100,4 +100,4 @@ ["babelify", { "presets": ["es2015"] }] ] } -} +} \ No newline at end of file diff --git a/test/solidity/localsTests/int.js b/test/solidity/localsTests/int.js index 786f1a1c07..797f306630 100644 --- a/test/solidity/localsTests/int.js +++ b/test/solidity/localsTests/int.js @@ -33,11 +33,11 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu try { st.equals(scopeStarts[0], '') st.equals(scopeStarts[12], '1') - st.equals(scopeStarts[106], '2') - st.equals(scopeStarts[121], '2.1') - st.equals(scopeStarts[144], '3') - st.equals(scopeStarts[163], '4') - st.equals(scopeStarts[178], '4.1') + st.equals(scopeStarts[104], '2') + st.equals(scopeStarts[119], '2.1') + st.equals(scopeStarts[142], '3') + st.equals(scopeStarts[161], '4') + st.equals(scopeStarts[176], '4.1') st.equals(scopes[''].locals['ui8'].type.typeName, 'uint8') st.equals(scopes[''].locals['ui16'].type.typeName, 'uint16') st.equals(scopes[''].locals['ui32'].type.typeName, 'uint32') @@ -81,7 +81,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu st.equals(locals['ishrink'].value, '2') }) - helper.decodeLocals(st, 177, traceManager, callTree, function (locals) { + helper.decodeLocals(st, 175, traceManager, callTree, function (locals) { try { st.equals(locals['ui8'].value, '123') st.equals(Object.keys(locals).length, 1) diff --git a/test/solidity/localsTests/misc2.js b/test/solidity/localsTests/misc2.js index 9b9f6152f4..7feeea47fa 100644 --- a/test/solidity/localsTests/misc2.js +++ b/test/solidity/localsTests/misc2.js @@ -30,7 +30,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu st.fail(error) }) callTree.event.register('callTreeReady', (scopes, scopeStarts) => { - helper.decodeLocals(st, 96, traceManager, callTree, function (locals) { + helper.decodeLocals(st, 88, traceManager, callTree, function (locals) { try { st.equals(locals['dynbytes'].value, '0x64796e616d69636279746573') st.equals(locals['smallstring'].value, 'test_test_test') diff --git a/test/sourceMappingDecoder.js b/test/sourceMappingDecoder.js index b1d5276897..b19865290a 100644 --- a/test/sourceMappingDecoder.js +++ b/test/sourceMappingDecoder.js @@ -9,7 +9,7 @@ tape('SourceMappingDecoder', function (t) { var sourceMappingDecoder = new SourceMappingDecoder() var node = sourceMappingDecoder.findNodeAtInstructionIndex('FunctionDefinition', 2, output.contracts[':test'].srcmapRuntime, output.sources['']) st.equal(node, null) - node = sourceMappingDecoder.findNodeAtInstructionIndex('FunctionDefinition', 37, output.contracts[':test'].srcmapRuntime, output.sources['']) + node = sourceMappingDecoder.findNodeAtInstructionIndex('FunctionDefinition', 80, output.contracts[':test'].srcmapRuntime, output.sources['']) st.notEqual(node, null) if (node) { st.equal(node.attributes.name, 'f1')