mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Squashed 'libjsqrc/ethereumjs/' changes from 2c36d5f..e94da80
e94da80 default padding set to 32, separated to one variable a1c0bb6 fixed checking first bit for parsing int output 774e9d2 abi.js rounds down floating point input 9a264a4 updated bower.json && package.json version, added bignumber.js to bower dependencies 0172939 fixed #28 and other small node.js issues git-subtree-dir: libjsqrc/ethereumjs git-subtree-split: e94da808cb2a9f0493b42e5e572f6aed78de5ee3
This commit is contained in:
parent
46e67c9862
commit
adfd7d621d
@ -43,6 +43,11 @@ describe('abi', function() {
|
||||
parser.test(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16)),
|
||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
||||
);
|
||||
assert.equal(parser.test(0.1), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test(3.9), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
assert.equal(parser.test('0.1'), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test('3.9'), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
|
||||
|
||||
});
|
||||
|
||||
@ -69,6 +74,10 @@ describe('abi', function() {
|
||||
parser.test(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16)),
|
||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
||||
);
|
||||
assert.equal(parser.test(0.1), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test(3.9), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
assert.equal(parser.test('0.1'), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test('3.9'), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
|
||||
});
|
||||
|
||||
@ -95,6 +104,10 @@ describe('abi', function() {
|
||||
parser.test(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16)),
|
||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
||||
);
|
||||
assert.equal(parser.test(0.1), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test(3.9), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
assert.equal(parser.test('0.1'), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test('3.9'), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
|
||||
});
|
||||
|
||||
@ -124,6 +137,10 @@ describe('abi', function() {
|
||||
parser.test(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16)),
|
||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
||||
);
|
||||
assert.equal(parser.test(0.1), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test(3.9), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
assert.equal(parser.test('0.1'), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test('3.9'), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
});
|
||||
|
||||
it('should parse input int128', function() {
|
||||
@ -152,6 +169,10 @@ describe('abi', function() {
|
||||
parser.test(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16)),
|
||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
||||
);
|
||||
assert.equal(parser.test(0.1), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test(3.9), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
assert.equal(parser.test('0.1'), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test('3.9'), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
|
||||
});
|
||||
|
||||
@ -181,6 +202,10 @@ describe('abi', function() {
|
||||
parser.test(new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16)),
|
||||
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
||||
);
|
||||
assert.equal(parser.test(0.1), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test(3.9), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
assert.equal(parser.test('0.1'), "0000000000000000000000000000000000000000000000000000000000000000");
|
||||
assert.equal(parser.test('3.9'), "0000000000000000000000000000000000000000000000000000000000000003");
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user