From efec139bd8dad6aa442d0affe47177f04e482ad6 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 20 Aug 2024 21:47:22 +0530 Subject: [PATCH] more test fixes --- libs/remix-debug/test/debugger.ts | 7 ++++--- libs/remix-debug/test/decoder/contracts/miscLocal.ts | 2 +- libs/remix-debug/test/decoder/localsTests/structArray.ts | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/libs/remix-debug/test/debugger.ts b/libs/remix-debug/test/debugger.ts index 7c51ce7fc4..6123d6332d 100644 --- a/libs/remix-debug/test/debugger.ts +++ b/libs/remix-debug/test/debugger.ts @@ -214,11 +214,12 @@ function testDebugging (debugManager) { try { const callstack = debugManager.traceManager.getStackAt(41) t.equal(JSON.stringify(callstack), JSON.stringify([ - '0x0000000000000000000000000000000000000000000000000000000000000080', - '0x0000000000000000000000000000000000000000000000000000000000000020', + '0x0000000000000000000000000000000000000000000000000000000000000318', + '0x0000000000000000000000000000000000000000000000000000000000000001', + '0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000080', '0x00000000000000000000000000000000000000000000000000000000000000e0', - '0x00000000000000000000000000000000000000000000000000000000000000e0'])) + '0x0000000000000000000000000000000000000000000000000000000000000031'])) } catch (error) { return t.end(error) } diff --git a/libs/remix-debug/test/decoder/contracts/miscLocal.ts b/libs/remix-debug/test/decoder/contracts/miscLocal.ts index 56d3a63649..421ddd86b4 100644 --- a/libs/remix-debug/test/decoder/contracts/miscLocal.ts +++ b/libs/remix-debug/test/decoder/contracts/miscLocal.ts @@ -15,7 +15,7 @@ contract miscLocal { enumDef testEnum; testEnum = enumDef.three; address sender = msg.sender; - byte _bytes1 = hex"99"; + bytes1 _bytes1 = hex"99"; bytes1 __bytes1 = hex"99"; bytes2 __bytes2 = hex"99AB"; bytes4 __bytes4 = hex"99FA"; diff --git a/libs/remix-debug/test/decoder/localsTests/structArray.ts b/libs/remix-debug/test/decoder/localsTests/structArray.ts index 4410711624..9a13cd5ffd 100644 --- a/libs/remix-debug/test/decoder/localsTests/structArray.ts +++ b/libs/remix-debug/test/decoder/localsTests/structArray.ts @@ -42,9 +42,9 @@ module.exports = function (st, privateKey, contractBytecode, compilationResult,c st.fail(error) }) callTree.event.register('callTreeReady', (scopes, scopeStarts) => { - helper.decodeLocals(st, 1622, traceManager, callTree, function (locals) { + helper.decodeLocals(st, 1600, traceManager, callTree, function (locals) { try { - console.log('at 1622', locals) + console.log('at 1600', locals) st.equals(locals['bytesSimple'].length, '0x14') st.equals(locals['bytesSimple'].value, '0x746573745f7375706572') st.equals(locals['e'].value['a'].value, 'test') @@ -103,7 +103,7 @@ module.exports = function (st, privateKey, contractBytecode, compilationResult,c st.equals(locals['arrayStruct'].value.b.value[0].value, '34') st.equals(locals['arrayStruct'].value.b.value[1].value, '-23') st.equals(locals['arrayStruct'].value.b.value[2].value, '-3') - st.equals(locals['arrayStruct'].value.c.value, 'three') + st.equals(locals['arrayStruct'].value.c.value, 'one') st.equals(Object.keys(locals).length, 8) } catch (e) {