File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -468,6 +468,40 @@ function runTests (solc, versionText) {
468
468
st . end ( ) ;
469
469
} ) ;
470
470
471
+ t . test ( 'compiling standard JSON (abstract contract)' , function ( st ) {
472
+ // <0.1.6 doesn't have this
473
+ if ( ! solc . features . multipleInputs ) {
474
+ st . skip ( 'Not supported by solc' ) ;
475
+ st . end ( ) ;
476
+ return ;
477
+ }
478
+
479
+ var isVersion6 = semver . gt ( solc . semver ( ) , '0.5.99' ) ;
480
+
481
+ var input = {
482
+ 'language' : 'Solidity' ,
483
+ 'settings' : {
484
+ 'outputSelection' : {
485
+ '*' : {
486
+ '*' : [ 'evm.bytecode' , 'evm.gasEstimates' ]
487
+ }
488
+ }
489
+ } ,
490
+ 'sources' : {
491
+ 'c.sol' : {
492
+ 'content' : ( isVersion6 ? 'abstract ' : '' ) + 'contract C { function f() public; }'
493
+ }
494
+ }
495
+ } ;
496
+
497
+ var output = JSON . parse ( solc . compile ( JSON . stringify ( input ) ) ) ;
498
+ st . ok ( expectNoError ( output ) ) ;
499
+ var C = getBytecodeStandard ( output , 'c.sol' , 'C' ) ;
500
+ st . ok ( typeof C === 'string' ) ;
501
+ st . ok ( C . length === 0 ) ;
502
+ st . end ( ) ;
503
+ } ) ;
504
+
471
505
t . test ( 'compiling standard JSON (with imports)' , function ( st ) {
472
506
// <0.2.1 doesn't have this
473
507
if ( ! solc . features . importCallback ) {
You can’t perform that action at this time.
0 commit comments