Skip to content

Commit 14f8130

Browse files
committed
Use compileStandardWrapper in loadRemoteVersion test
1 parent cdbf6b6 commit 14f8130

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

test/package.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -585,15 +585,25 @@ tape('Loading Legacy Versions', function (t) {
585585
st.end();
586586
return;
587587
}
588-
if (!solcSnapshot.supportsSingle) {
589-
st.plan(1);
590-
st.skip('Not supported by solc');
591-
st.end();
592-
return;
593-
}
594-
var output = solcSnapshot.compile('contract x { function g() public {} }');
595-
st.ok(':x' in output.contracts);
596-
st.ok(output.contracts[':x'].bytecode.length > 0);
588+
var input = {
589+
'language': 'Solidity',
590+
'settings': {
591+
'outputSelection': {
592+
'*': {
593+
'*': [ 'evm.bytecode' ]
594+
}
595+
}
596+
},
597+
'sources': {
598+
'cont.sol': {
599+
'content': 'contract x { function g() public {} }'
600+
}
601+
}
602+
};
603+
var output = JSON.parse(solcSnapshot.compileStandardWrapper(JSON.stringify(input)));
604+
var x = getBytecodeStandard(output, 'cont.sol', 'x');
605+
st.ok(x);
606+
st.ok(x.length > 0);
597607
});
598608
});
599609
});

0 commit comments

Comments
 (0)