more test fixes

pull/5101/head
aniket-engg 3 months ago committed by Aniket
parent 3ac9bb5a18
commit efec139bd8
  1. 7
      libs/remix-debug/test/debugger.ts
  2. 2
      libs/remix-debug/test/decoder/contracts/miscLocal.ts
  3. 6
      libs/remix-debug/test/decoder/localsTests/structArray.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)
}

@ -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";

@ -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) {

Loading…
Cancel
Save