Skip to content

Commit 6232150

Browse files
authored
Merge pull request #187 from ethereum/test-safety
Ensure that linker tests require input bytecode
2 parents 4f3c25a + 7404616 commit 6232150

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/package.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ tape('Linking', function (t) {
306306
st.ok('contracts' in output);
307307
st.ok('cont.sol:x' in output.contracts);
308308
st.ok('bytecode' in output.contracts['cont.sol:x']);
309+
st.ok(output.contracts['cont.sol:x'].bytecode.length > 0);
309310
var bytecode = solc.linkBytecode(output.contracts['cont.sol:x'].bytecode, { 'lib.sol:L': '0x123456' });
310311
st.ok(bytecode.indexOf('_') < 0);
311312
st.end();
@@ -320,6 +321,7 @@ tape('Linking', function (t) {
320321
st.ok('contracts' in output);
321322
st.ok('cont.sol:x' in output.contracts);
322323
st.ok('bytecode' in output.contracts['cont.sol:x']);
324+
st.ok(output.contracts['cont.sol:x'].bytecode.length > 0);
323325
var bytecode = solc.linkBytecode(output.contracts['cont.sol:x'].bytecode, { });
324326
st.ok(bytecode.indexOf('_') >= 0);
325327
st.end();
@@ -334,6 +336,7 @@ tape('Linking', function (t) {
334336
st.ok('contracts' in output);
335337
st.ok('cont.sol:x' in output.contracts);
336338
st.ok('bytecode' in output.contracts['cont.sol:x']);
339+
st.ok(output.contracts['cont.sol:x'].bytecode.length > 0);
337340
st.throws(function () {
338341
solc.linkBytecode(output.contracts['cont.sol:x'].bytecode, { 'lib.sol:L': '' });
339342
});
@@ -349,6 +352,7 @@ tape('Linking', function (t) {
349352
st.ok('contracts' in output);
350353
st.ok('cont.sol:x' in output.contracts);
351354
st.ok('bytecode' in output.contracts['cont.sol:x']);
355+
st.ok(output.contracts['cont.sol:x'].bytecode.length > 0);
352356
var bytecode = solc.linkBytecode(output.contracts['cont.sol:x'].bytecode, { 'lib.sol:L1234567890123456789012345678901234567890': '0x123456' });
353357
st.ok(bytecode.indexOf('_') < 0);
354358
st.end();

0 commit comments

Comments
 (0)