@@ -4,25 +4,25 @@ const solc = require('../index.js');
4
4
5
5
tape ( 'Deterministic Compilation' , function ( t ) {
6
6
t . test ( 'DAO' , function ( st ) {
7
- var input = { } ;
8
- var prevBytecode = null ;
9
- var testdir = 'test/DAO/' ;
10
- var files = [ 'DAO.sol' , 'Token.sol' , 'TokenCreation.sol' , 'ManagedAccount.sol' ] ;
11
- var i ;
7
+ const input = { } ;
8
+ let prevBytecode = null ;
9
+ const testdir = 'test/DAO/' ;
10
+ const files = [ 'DAO.sol' , 'Token.sol' , 'TokenCreation.sol' , 'ManagedAccount.sol' ] ;
11
+ let i ;
12
12
for ( i in files ) {
13
- var file = files [ i ] ;
13
+ const file = files [ i ] ;
14
14
input [ file ] = { content : fs . readFileSync ( testdir + file , 'utf8' ) } ;
15
15
}
16
16
for ( i = 0 ; i < 10 ; i ++ ) {
17
- var output = JSON . parse ( solc . compile ( JSON . stringify ( {
17
+ const output = JSON . parse ( solc . compile ( JSON . stringify ( {
18
18
language : 'Solidity' ,
19
19
settings : {
20
20
optimizer : {
21
21
enabled : true
22
22
} ,
23
23
outputSelection : {
24
24
'*' : {
25
- '*' : [ 'evm.bytecode' ]
25
+ '*' : [ 'evm.bytecode' ]
26
26
}
27
27
}
28
28
} ,
@@ -31,9 +31,9 @@ tape('Deterministic Compilation', function (t) {
31
31
st . ok ( output ) ;
32
32
st . ok ( output . contracts ) ;
33
33
st . ok ( output . contracts [ 'DAO.sol' ] ) ;
34
- st . ok ( output . contracts [ 'DAO.sol' ] [ ' DAO' ] ) ;
35
- st . ok ( output . contracts [ 'DAO.sol' ] [ ' DAO' ] . evm . bytecode . object ) ;
36
- var bytecode = output . contracts [ 'DAO.sol' ] [ ' DAO' ] . evm . bytecode . object ;
34
+ st . ok ( output . contracts [ 'DAO.sol' ] . DAO ) ;
35
+ st . ok ( output . contracts [ 'DAO.sol' ] . DAO . evm . bytecode . object ) ;
36
+ const bytecode = output . contracts [ 'DAO.sol' ] . DAO . evm . bytecode . object ;
37
37
st . ok ( bytecode . length > 0 ) ;
38
38
if ( prevBytecode !== null ) {
39
39
st . equal ( prevBytecode , bytecode ) ;
0 commit comments