@@ -57,7 +57,7 @@ tape('Compilation', function (t) {
57
57
var output = JSON . parse ( solc . lowlevel . compileSingle ( 'contract x { function g() public {} }' ) ) ;
58
58
st . ok ( 'contracts' in output ) ;
59
59
var bytecode = getBytecode ( output , '' , 'x' ) ;
60
- st . ok ( bytecode ) ;
60
+ st . ok ( typeof bytecode === 'string' ) ;
61
61
st . ok ( bytecode . length > 0 ) ;
62
62
st . end ( ) ;
63
63
} ) ;
@@ -109,10 +109,10 @@ tape('Compilation', function (t) {
109
109
} ;
110
110
var output = JSON . parse ( solc . lowlevel . compileMulti ( JSON . stringify ( { sources : input } ) ) ) ;
111
111
var x = getBytecode ( output , 'cont.sol' , 'x' ) ;
112
- st . ok ( x ) ;
112
+ st . ok ( typeof x === 'string' ) ;
113
113
st . ok ( x . length > 0 ) ;
114
114
var L = getBytecode ( output , 'lib.sol' , 'L' ) ;
115
- st . ok ( L ) ;
115
+ st . ok ( typeof L === 'string' ) ;
116
116
st . ok ( L . length > 0 ) ;
117
117
st . end ( ) ;
118
118
} ) ;
@@ -138,9 +138,9 @@ tape('Compilation', function (t) {
138
138
var output = JSON . parse ( solc . lowlevel . compileCallback ( JSON . stringify ( { sources : input } ) , 0 , findImports ) ) ;
139
139
var x = getBytecode ( output , 'cont.sol' , 'x' ) ;
140
140
var L = getBytecode ( output , 'lib.sol' , 'L' ) ;
141
- st . ok ( x ) ;
141
+ st . ok ( typeof x === 'string' ) ;
142
142
st . ok ( x . length > 0 ) ;
143
- st . ok ( L ) ;
143
+ st . ok ( typeof L === 'string' ) ;
144
144
st . ok ( L . length > 0 ) ;
145
145
st . end ( ) ;
146
146
} ) ;
@@ -388,10 +388,10 @@ tape('Compilation', function (t) {
388
388
389
389
var output = JSON . parse ( solc . compile ( JSON . stringify ( input ) ) ) ;
390
390
var x = getBytecodeStandard ( output , 'cont.sol' , 'x' ) ;
391
- st . ok ( x ) ;
391
+ st . ok ( typeof x === 'string' ) ;
392
392
st . ok ( x . length > 0 ) ;
393
393
var L = getBytecodeStandard ( output , 'lib.sol' , 'L' ) ;
394
- st . ok ( L ) ;
394
+ st . ok ( typeof L === 'string' ) ;
395
395
st . ok ( L . length > 0 ) ;
396
396
st . end ( ) ;
397
397
} ) ;
@@ -430,10 +430,10 @@ tape('Compilation', function (t) {
430
430
431
431
var output = JSON . parse ( solc . compile ( JSON . stringify ( input ) , findImports ) ) ;
432
432
var x = getBytecodeStandard ( output , 'cont.sol' , 'x' ) ;
433
- st . ok ( x ) ;
433
+ st . ok ( typeof x === 'string' ) ;
434
434
st . ok ( x . length > 0 ) ;
435
435
var L = getBytecodeStandard ( output , 'lib.sol' , 'L' ) ;
436
- st . ok ( L ) ;
436
+ st . ok ( typeof L === 'string' ) ;
437
437
st . ok ( L . length > 0 ) ;
438
438
439
439
var outputNewApi = JSON . parse ( solc . compile ( JSON . stringify ( input ) , { import : findImports } ) ) ;
@@ -475,11 +475,11 @@ tape('Compilation', function (t) {
475
475
476
476
var output = JSON . parse ( solc . compile ( JSON . stringify ( input ) ) ) ;
477
477
var x = getBytecodeStandard ( output , 'cont.sol' , 'x' ) ;
478
- st . ok ( x ) ;
478
+ st . ok ( typeof x === 'string' ) ;
479
479
st . ok ( x . length > 0 ) ;
480
480
st . ok ( Object . keys ( linker . findLinkReferences ( x ) ) . length === 0 ) ;
481
481
var L = getBytecodeStandard ( output , 'lib.sol' , 'L' ) ;
482
- st . ok ( L ) ;
482
+ st . ok ( typeof L === 'string' ) ;
483
483
st . ok ( L . length > 0 ) ;
484
484
st . end ( ) ;
485
485
} ) ;
@@ -517,11 +517,11 @@ tape('Compilation', function (t) {
517
517
518
518
var output = JSON . parse ( solc . lowlevel . compileStandard ( JSON . stringify ( input ) ) ) ;
519
519
var x = getBytecodeStandard ( output , 'cont.sol' , 'x' ) ;
520
- st . ok ( x ) ;
520
+ st . ok ( typeof x === 'string' ) ;
521
521
st . ok ( x . length > 0 ) ;
522
522
st . ok ( Object . keys ( linker . findLinkReferences ( x ) ) . length === 0 ) ;
523
523
var L = getBytecodeStandard ( output , 'lib.sol' , 'L' ) ;
524
- st . ok ( L ) ;
524
+ st . ok ( typeof L === 'string' ) ;
525
525
st . ok ( L . length > 0 ) ;
526
526
st . end ( ) ;
527
527
} ) ;
@@ -555,7 +555,7 @@ tape('Loading Legacy Versions', function (t) {
555
555
} ;
556
556
var output = JSON . parse ( solcSnapshot . compile ( JSON . stringify ( input ) ) ) ;
557
557
var x = getBytecodeStandard ( output , 'cont.sol' , 'x' ) ;
558
- st . ok ( x ) ;
558
+ st . ok ( typeof x === 'string' ) ;
559
559
st . ok ( x . length > 0 ) ;
560
560
} ) ;
561
561
} ) ;
0 commit comments