aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-02-23 21:32:17 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-02-23 21:32:17 +0800
commitc5b2733d1e405487b0b3d419b22a08883ac487dd (patch)
treedc8257f8e0a2b9b01c63721a4fdeb2eb6e125b16
parentf924681adf68e5cfbbffa98795014e4fb4f476a8 (diff)
parentcd9262badfd1cd7425469d0eba94a5109c20960a (diff)
downloaddexon-solidity-c5b2733d1e405487b0b3d419b22a08883ac487dd.tar
dexon-solidity-c5b2733d1e405487b0b3d419b22a08883ac487dd.tar.gz
dexon-solidity-c5b2733d1e405487b0b3d419b22a08883ac487dd.tar.bz2
dexon-solidity-c5b2733d1e405487b0b3d419b22a08883ac487dd.tar.lz
dexon-solidity-c5b2733d1e405487b0b3d419b22a08883ac487dd.tar.xz
dexon-solidity-c5b2733d1e405487b0b3d419b22a08883ac487dd.tar.zst
dexon-solidity-c5b2733d1e405487b0b3d419b22a08883ac487dd.zip
Merge remote-tracking branch 'upstream/develop' into memTests
-rw-r--r--CMakeLists.txt4
-rw-r--r--SolidityEndToEndTest.cpp1
-rw-r--r--SolidityNameAndTypeResolution.cpp12
-rw-r--r--SolidityParser.cpp6
-rw-r--r--TestHelper.cpp4
-rw-r--r--transaction.cpp7
-rw-r--r--ttTransactionTestFiller.json15
7 files changed, 35 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc14918b..7ddfdb40 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,10 @@ aux_source_directory(. SRC_LIST)
list(REMOVE_ITEM SRC_LIST "./createRandomTest.cpp")
list(REMOVE_ITEM SRC_LIST "./checkRandomTest.cpp")
+if (NOT JSONRPC)
+ list(REMOVE_ITEM SRC_LIST "./AccountHolder.cpp")
+endif()
+
include_directories(BEFORE ${JSONCPP_INCLUDE_DIRS})
include_directories(BEFORE ..)
include_directories(${Boost_INCLUDE_DIRS})
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index 1f80b101..20bc8159 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -1669,7 +1669,6 @@ BOOST_AUTO_TEST_CASE(value_insane)
function test() { h = new helper(); }
function sendAmount(uint amount) returns (uint256 bal) {
var x1 = h.getBalance.value;
- uint someStackElement = 20;
var x2 = x1(amount).gas;
var x3 = x2(1000).value;
return x3(amount + 3)();// overwrite value
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp
index da6c2a88..df970a6e 100644
--- a/SolidityNameAndTypeResolution.cpp
+++ b/SolidityNameAndTypeResolution.cpp
@@ -470,7 +470,7 @@ BOOST_AUTO_TEST_CASE(illegal_override_indirect)
BOOST_AUTO_TEST_CASE(illegal_override_visibility)
{
char const* text = R"(
- contract B { function f() inheritable {} }
+ contract B { function f() internal {} }
contract C is B { function f() public {} }
)";
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
@@ -706,7 +706,7 @@ BOOST_AUTO_TEST_CASE(private_state_variable)
" uint64(2);\n"
" }\n"
"uint256 private foo;\n"
- "uint256 inheritable bar;\n"
+ "uint256 internal bar;\n"
"}\n";
ASTPointer<SourceUnit> source;
@@ -717,7 +717,7 @@ BOOST_AUTO_TEST_CASE(private_state_variable)
function = retrieveFunctionBySignature(contract, "foo()");
BOOST_CHECK_MESSAGE(function == nullptr, "Accessor function of a private variable should not exist");
function = retrieveFunctionBySignature(contract, "bar()");
- BOOST_CHECK_MESSAGE(function == nullptr, "Accessor function of an inheritable variable should not exist");
+ BOOST_CHECK_MESSAGE(function == nullptr, "Accessor function of an internal variable should not exist");
}
BOOST_AUTO_TEST_CASE(fallback_function)
@@ -832,11 +832,11 @@ BOOST_AUTO_TEST_CASE(access_to_default_function_visibility)
BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text));
}
-BOOST_AUTO_TEST_CASE(access_to_inheritable_function)
+BOOST_AUTO_TEST_CASE(access_to_internal_function)
{
char const* text = R"(
contract c {
- function f() inheritable {}
+ function f() internal {}
}
contract d {
function g() { c(0).f(); }
@@ -856,7 +856,7 @@ BOOST_AUTO_TEST_CASE(access_to_default_state_variable_visibility)
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
}
-BOOST_AUTO_TEST_CASE(access_to_inheritable_state_variable)
+BOOST_AUTO_TEST_CASE(access_to_internal_state_variable)
{
char const* text = R"(
contract c {
diff --git a/SolidityParser.cpp b/SolidityParser.cpp
index ddb58244..69bbc6e0 100644
--- a/SolidityParser.cpp
+++ b/SolidityParser.cpp
@@ -651,13 +651,13 @@ BOOST_AUTO_TEST_CASE(visibility_specifiers)
char const* text = R"(
contract c {
uint private a;
- uint inheritable b;
+ uint internal b;
uint public c;
uint d;
function f() {}
function f_priv() private {}
function f_public() public {}
- function f_inheritable() inheritable {}
+ function f_internal() internal {}
})";
BOOST_CHECK_NO_THROW(parseText(text));
}
@@ -666,7 +666,7 @@ BOOST_AUTO_TEST_CASE(multiple_visibility_specifiers)
{
char const* text = R"(
contract c {
- uint private inheritable a;
+ uint private internal a;
})";
BOOST_CHECK_THROW(parseText(text), ParserError);
}
diff --git a/TestHelper.cpp b/TestHelper.cpp
index ff6939a5..71d38103 100644
--- a/TestHelper.cpp
+++ b/TestHelper.cpp
@@ -475,11 +475,11 @@ void executeTests(const string& _name, const string& _testPathAppendix, std::fun
}
catch (Exception const& _e)
{
- BOOST_ERROR("Failed test with Exception: " << diagnostic_information(_e));
+ BOOST_ERROR("Failed filling test with Exception: " << diagnostic_information(_e));
}
catch (std::exception const& _e)
{
- BOOST_ERROR("Failed test with Exception: " << _e.what());
+ BOOST_ERROR("Failed filling test with Exception: " << _e.what());
}
break;
}
diff --git a/transaction.cpp b/transaction.cpp
index 7bd8ac20..6ebe6275 100644
--- a/transaction.cpp
+++ b/transaction.cpp
@@ -51,7 +51,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin)
catch(...)
{
BOOST_CHECK_MESSAGE(o.count("transaction") == 0, "A transaction object should not be defined because the RLP is invalid!");
- return;
+ continue;
}
BOOST_REQUIRE(o.count("transaction") > 0);
@@ -108,6 +108,11 @@ BOOST_AUTO_TEST_CASE(TransactionTest)
dev::test::executeTests("ttTransactionTest", "/TransactionTests", dev::test::doTransactionTests);
}
+BOOST_AUTO_TEST_CASE(ttWrongRLPTransaction)
+{
+ dev::test::executeTests("ttWrongRLPTransaction", "/TransactionTests", dev::test::doTransactionTests);
+}
+
BOOST_AUTO_TEST_CASE(tt10mbDataField)
{
dev::test::executeTests("tt10mbDataField", "/TransactionTests", dev::test::doTransactionTests);
diff --git a/ttTransactionTestFiller.json b/ttTransactionTestFiller.json
index 78615bb4..c54da4db 100644
--- a/ttTransactionTestFiller.json
+++ b/ttTransactionTestFiller.json
@@ -294,7 +294,7 @@
"gasPrice" : "1",
"nonce" : "0xffdc5",
"to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
- "value" : "0xfffdc12c",
+ "value" : "4294820140",
"v" : "28",
"r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a",
"s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
@@ -314,5 +314,18 @@
"r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a",
"s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3"
}
+ },
+ "unpadedRValue": {
+ "transaction": {
+ "nonce": "13",
+ "gasPrice": "0x09184e72a000",
+ "gasLimit": "0x2710",
+ "to": "7c47ef93268a311f4cad0c750724299e9b72c268",
+ "data": "0x379607f50000000000000000000000000000000000000000000000000000000000000005",
+ "r": "0x006ab6dda9f4df56ea45583af36660329147f1753f3724ea5eb9ed83e812ca77",
+ "s": "0x495701e230667832c8999e884e366a61028633ecf951e8cd66d119f381ae5718",
+ "v": "28",
+ "value": ""
+ }
}
}