Merge pull request #579 from ethereum/fixTestWithNewcompiler

Fix test with newcompiler && fix standard
pull/7/head
yann300 7 years ago committed by GitHub
commit f05d3bc043
  1. 2
      package.json
  2. 30
      src/ui/styles/basicStyles.js
  3. 54
      src/ui/styles/style-guide.js
  4. 14
      test/solidity/localsTests/int.js
  5. 2
      test/solidity/localsTests/structArray.js

@ -58,7 +58,7 @@
"start_dev": "npm-run-all -lpr serve watch onchange",
"start_eth": "npm run warning_message; eth -j --rpccorsdomain '*'",
"start_geth": "npm run warning_message; geth --rpc --rpcapi 'web3,eth,debug' --rpcport 8545 --rpccorsdomain '*'",
"test": "standard; tape ./test/tests.js",
"test": "standard && tape ./test/tests.js",
"test-browser": "npm-run-all -lpr selenium serve waittest",
"waittest": "sleep 5 && npm run nightwatch_local",
"warning_message": "echo 'DO NOT DO THIS IF eth/geth STORES PRIVATE KEYS!! External system might be able to access your node through the RPC server.\n\n';",

@ -65,20 +65,20 @@ module.exports = {
'margin-bottom': '10px'
},
button: {
'border-color' : 'transparent',
'border-radius' : '3px',
'border' : '.3px solid ${colors.veryLightGrey}',
'cursor' : 'pointer',
'min-height' : '25px',
'max-height' : '25px',
'padding' : '3px',
'min-width' : '100px',
'font-size' : '12px',
'overflow' : 'hidden',
'word-break' : 'normal',
'background-color' : 'hsla(0, 0%, 40%, .2)',
'color' : 'hsla(0, 0%, 40%, 1)',
'margin' : '3px',
'text-decoration' : 'none'
'border-color': 'transparent',
'border-radius': '3px',
'border': '.3px solid ${colors.veryLightGrey}',
'cursor': 'pointer',
'min-height': '25px',
'max-height': '25px',
'padding': '3px',
'min-width': '100px',
'font-size': '12px',
'overflow': 'hidden',
'word-break': 'normal',
'background-color': 'hsla(0, 0%, 40%, .2)',
'color': 'hsla(0, 0%, 40%, 1)',
'margin': '3px',
'text-decoration': 'none'
}
}

@ -1,4 +1,4 @@
var csjs = require('csjs-inject')
// var csjs = require('csjs-inject')
module.exports = styleGuide
@ -40,32 +40,32 @@ function styleGuide () {
FONTS
-------------------------------------------------------------------------- */
var texts = {
'title-XL': `
font-size : 2em;
font-weight : 700;
letter-spacing : .05em;
`,
'title-L': `
font-size : 1em;
font-weight : 600;
`,
'title-M': `
font-size : 1em;
font-weight : 400;
`,
'title-S': `
font-size : .8em;
font-weight : 300;
`,
'text': `
font-size : .8em;
`
}
var texts = {
'title-XL': `
font-size : 2em;
font-weight : 700;
letter-spacing : .05em;
`,
'title-L': `
font-size : 1em;
font-weight : 600;
`,
'title-M': `
font-size : 1em;
font-weight : 400;
`,
'title-S': `
font-size : .8em;
font-weight : 300;
`,
'text': `
font-size : .8em;
`
}
/* --------------------------------------------------------------------------
TEXT-BOXES

@ -32,12 +32,12 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu
callTree.event.register('callTreeReady', (scopes, scopeStarts) => {
try {
st.equals(scopeStarts[0], '')
st.equals(scopeStarts[12], '1')
st.equals(scopeStarts[104], '2')
st.equals(scopeStarts[119], '2.1')
st.equals(scopeStarts[142], '3')
st.equals(scopeStarts[161], '4')
st.equals(scopeStarts[176], '4.1')
st.equals(scopeStarts[11], '1')
st.equals(scopeStarts[103], '2')
st.equals(scopeStarts[118], '2.1')
st.equals(scopeStarts[139], '3')
st.equals(scopeStarts[157], '4')
st.equals(scopeStarts[172], '4.1')
st.equals(scopes[''].locals['ui8'].type.typeName, 'uint8')
st.equals(scopes[''].locals['ui16'].type.typeName, 'uint16')
st.equals(scopes[''].locals['ui32'].type.typeName, 'uint32')
@ -81,7 +81,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu
st.equals(locals['ishrink'].value, '2')
})
helper.decodeLocals(st, 175, traceManager, callTree, function (locals) {
helper.decodeLocals(st, 171, traceManager, callTree, function (locals) {
try {
st.equals(locals['ui8'].value, '123')
st.equals(Object.keys(locals).length, 1)

@ -30,7 +30,7 @@ module.exports = function (st, vm, privateKey, contractBytecode, compilationResu
st.fail(error)
})
callTree.event.register('callTreeReady', (scopes, scopeStarts) => {
helper.decodeLocals(st, 2094, traceManager, callTree, function (locals) {
helper.decodeLocals(st, 2089, traceManager, callTree, function (locals) {
try {
st.equals(locals['bytesSimple'].length, '0x14')
st.equals(locals['bytesSimple'].value, '0x746573745f7375706572')

Loading…
Cancel
Save