|
|
@ -13,12 +13,12 @@ function testIntStorage (st) { |
|
|
|
var intStorage = require('./contracts/intStorage') |
|
|
|
var intStorage = require('./contracts/intStorage') |
|
|
|
var output = compiler.compile(intStorage.contract, 0) |
|
|
|
var output = compiler.compile(intStorage.contract, 0) |
|
|
|
var decoded = stateDecoder.solidityState(intStorage.fullStorage, output.sources, 'intStorage') |
|
|
|
var decoded = stateDecoder.solidityState(intStorage.fullStorage, output.sources, 'intStorage') |
|
|
|
st.equal(decoded['ui8'], '123') |
|
|
|
st.equal(decoded['ui8'], '130') |
|
|
|
st.equal(decoded['ui16'], '456') |
|
|
|
st.equal(decoded['ui16'], '456') |
|
|
|
st.equal(decoded['ui32'], '4356') |
|
|
|
st.equal(decoded['ui32'], '4356') |
|
|
|
st.equal(decoded['ui64'], '3543543543') |
|
|
|
st.equal(decoded['ui64'], '3543543543') |
|
|
|
st.equal(decoded['ui128'], '234567') |
|
|
|
st.equal(decoded['ui128'], '234567') |
|
|
|
st.equal(decoded['ui256'], '234566666656') |
|
|
|
st.equal(decoded['ui256'], '115792089237316195423570985008687907853269984665640564039457584007880697216513') |
|
|
|
st.equal(decoded['ui'], '123545666') |
|
|
|
st.equal(decoded['ui'], '123545666') |
|
|
|
st.equal(decoded['i8'], '-45') |
|
|
|
st.equal(decoded['i8'], '-45') |
|
|
|
st.equal(decoded['i16'], '-1234') |
|
|
|
st.equal(decoded['i16'], '-1234') |
|
|
@ -29,6 +29,7 @@ function testIntStorage (st) { |
|
|
|
st.equal(decoded['i'], '-32432423423') |
|
|
|
st.equal(decoded['i'], '-32432423423') |
|
|
|
st.equal(decoded['ishrink'], '2') |
|
|
|
st.equal(decoded['ishrink'], '2') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
decoded = stateDecoder.solidityState(intStorage.shrinkedStorage, output.sources, 'intStorage') |
|
|
|
decoded = stateDecoder.solidityState(intStorage.shrinkedStorage, output.sources, 'intStorage') |
|
|
|
st.equal(decoded['ui8'], '123') |
|
|
|
st.equal(decoded['ui8'], '123') |
|
|
|
st.equal(decoded['ui16'], '456') |
|
|
|
st.equal(decoded['ui16'], '456') |
|
|
@ -45,6 +46,7 @@ function testIntStorage (st) { |
|
|
|
st.equal(decoded['i256'], '3434343') |
|
|
|
st.equal(decoded['i256'], '3434343') |
|
|
|
st.equal(decoded['i'], '-32432423423') |
|
|
|
st.equal(decoded['i'], '-32432423423') |
|
|
|
st.equal(decoded['ishrink'], '2') |
|
|
|
st.equal(decoded['ishrink'], '2') |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
decoded = stateDecoder.solidityState({}, output.sources, 'intStorage') |
|
|
|
decoded = stateDecoder.solidityState({}, output.sources, 'intStorage') |
|
|
|
st.equal(decoded['ui8'], '0') |
|
|
|
st.equal(decoded['ui8'], '0') |
|
|
|