mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
1efd3c2687
4def095 updated README.md 15b4dbd updated bower && package.json files 0ccc05a web3 in global namespace ccc59d1 version 0.2.6 9c2c946 Merge branch 'web3' into develop 6763f34 tests for creating new contract with nondefault constructor, added missing files 2ef5efc fixed #70, creating contract with nondefault constructor dbe4015 Merge branch 'master' into develop 48b351a add gasPrice test and fixed failing uncle tests 7f75f3e fixed gasPrice output ddec629 fixed getUncle parameter count 1e89ef0 changed to eth_protocolVersion 6add9bd Merge pull request #151 from ethereum/develop git-subtree-dir: libjsqrc/ethereumjs git-subtree-split: 4def0958d35cb5b8d92d277423af4d435dd89f16
24 lines
747 B
JavaScript
24 lines
747 B
JavaScript
var chai = require('chai');
|
|
var utils = require('../lib/utils/utils.js');
|
|
var assert = chai.assert;
|
|
|
|
var tests = [
|
|
{ value: function () {}, is: false},
|
|
{ value: new Function(), is: false},
|
|
{ value: 'function', is: false},
|
|
{ value: {}, is: false},
|
|
{ value: '0xc6d9d2cd449a754c494264e1809c50e34d64562b', is: true },
|
|
{ value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: false }
|
|
];
|
|
|
|
describe('lib/utils/utils', function () {
|
|
describe('isStrictAddress', function () {
|
|
tests.forEach(function (test) {
|
|
it('shoud test if value ' + test.value + ' is address: ' + test.is, function () {
|
|
assert.equal(utils.isStrictAddress(test.value), test.is);
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|