aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsubtly <subtly@users.noreply.github.com>2015-04-01 23:32:12 +0800
committersubtly <subtly@users.noreply.github.com>2015-04-01 23:32:12 +0800
commitce22d156557b137304aa4e4a6ed3e384ee2f72cc (patch)
tree9b2e2c7a4bdf9c15d30b6f19ce3e98460f6bdb7d
parenta1d7b50ea1ddf94321b93f2f76ef2cd6a4f22ca7 (diff)
parent9d734e03fd085a3cbd1a403bd63e51da19e165b5 (diff)
downloaddexon-solidity-ce22d156557b137304aa4e4a6ed3e384ee2f72cc.tar
dexon-solidity-ce22d156557b137304aa4e4a6ed3e384ee2f72cc.tar.gz
dexon-solidity-ce22d156557b137304aa4e4a6ed3e384ee2f72cc.tar.bz2
dexon-solidity-ce22d156557b137304aa4e4a6ed3e384ee2f72cc.tar.lz
dexon-solidity-ce22d156557b137304aa4e4a6ed3e384ee2f72cc.tar.xz
dexon-solidity-ce22d156557b137304aa4e4a6ed3e384ee2f72cc.tar.zst
dexon-solidity-ce22d156557b137304aa4e4a6ed3e384ee2f72cc.zip
Merge branch 'develop' into p2p
-rw-r--r--SolidityNameAndTypeResolution.cpp14
-rw-r--r--dagger.cpp4
2 files changed, 14 insertions, 4 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp
index ddcf3614..531f3bc1 100644
--- a/SolidityNameAndTypeResolution.cpp
+++ b/SolidityNameAndTypeResolution.cpp
@@ -460,7 +460,7 @@ BOOST_AUTO_TEST_CASE(function_external_types)
uint a;
}
contract Test {
- function boo(uint arg2, bool arg3, bytes8 arg4, bool[2] pairs, uint[] dynamic, C carg) external returns (uint ret) {
+ function boo(uint arg2, bool arg3, bytes8 arg4, bool[2] pairs, uint[] dynamic, C carg, address[] addresses) external returns (uint ret) {
ret = 5;
}
})";
@@ -471,7 +471,7 @@ BOOST_AUTO_TEST_CASE(function_external_types)
auto functions = contract->getDefinedFunctions();
if (functions.empty())
continue;
- BOOST_CHECK_EQUAL("boo(uint256,bool,bytes8,bool[2],uint256[],address)", functions[0]->externalSignature());
+ BOOST_CHECK_EQUAL("boo(uint256,bool,bytes8,bool[2],uint256[],address,address[])", functions[0]->externalSignature());
}
}
@@ -503,6 +503,16 @@ BOOST_AUTO_TEST_CASE(function_external_call_not_allowed_conversion)
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
}
+// todo delete when implemented
+BOOST_AUTO_TEST_CASE(arrays_in_internal_functions)
+{
+ char const* text = R"(
+ contract Test {
+ function foo(address[] addresses) {}
+ })";
+ BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
+}
+
BOOST_AUTO_TEST_CASE(function_internal_allowed_conversion)
{
char const* text = R"(
diff --git a/dagger.cpp b/dagger.cpp
index f7230f70..4dda9c4f 100644
--- a/dagger.cpp
+++ b/dagger.cpp
@@ -63,8 +63,8 @@ BOOST_AUTO_TEST_CASE(basic_test)
unsigned cacheSize(o["cache_size"].get_int());
h256 cacheHash(o["cache_hash"].get_str());
- BOOST_REQUIRE_EQUAL(Ethasher::get()->cache(header).size(), cacheSize);
- BOOST_REQUIRE_EQUAL(sha3(Ethasher::get()->cache(header)), cacheHash);
+ BOOST_REQUIRE_EQUAL(Ethasher::get()->params(header).cache_size, cacheSize);
+ BOOST_REQUIRE_EQUAL(sha3(bytesConstRef((byte const*)Ethasher::get()->cache(header), cacheSize)), cacheHash);
#if TEST_FULL
unsigned fullSize(o["full_size"].get_int());