Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 893d6b9

Browse files
committedJun 6, 2019
Added empty_contract_via_yul.sol
Removed transaction_status, empty_contract and smoke_test from SolidityEndToEnd.cpp Removed trailing white spaces from empty_contract.sol and transaction_status.sol
1 parent d2352df commit 893d6b9

File tree

4 files changed

+11
-46
lines changed

4 files changed

+11
-46
lines changed
 

‎test/libsolidity/SolidityEndToEndTest.cpp

-41
Original file line numberDiff line numberDiff line change
@@ -64,47 +64,6 @@ int constexpr roundTo32(int _num)
6464
return (_num + 31) / 32 * 32;
6565
}
6666

67-
BOOST_AUTO_TEST_CASE(transaction_status)
68-
{
69-
char const* sourceCode = R"(
70-
contract test {
71-
function f() public { }
72-
function g() public { revert(); }
73-
function h() public { assert(false); }
74-
}
75-
)";
76-
compileAndRun(sourceCode);
77-
callContractFunction("f()");
78-
BOOST_CHECK(m_transactionSuccessful);
79-
callContractFunction("g()");
80-
BOOST_CHECK(!m_transactionSuccessful);
81-
callContractFunction("h()");
82-
BOOST_CHECK(!m_transactionSuccessful);
83-
}
84-
85-
86-
BOOST_AUTO_TEST_CASE(smoke_test)
87-
{
88-
char const* sourceCode = R"(
89-
contract test {
90-
function f(uint a) public returns(uint d) { return a * 7; }
91-
}
92-
)";
93-
compileAndRun(sourceCode);
94-
testContractAgainstCppOnRange("f(uint256)", [](u256 const& a) -> u256 { return a * 7; }, 0, 100);
95-
}
96-
97-
BOOST_AUTO_TEST_CASE(empty_contract)
98-
{
99-
char const* sourceCode = R"(
100-
contract test { }
101-
)";
102-
ALSO_VIA_YUL(
103-
compileAndRun(sourceCode);
104-
BOOST_CHECK(callContractFunction("i_am_not_there()", bytes()).empty());
105-
)
106-
}
107-
10867
BOOST_AUTO_TEST_CASE(exp_operator)
10968
{
11069
char const* sourceCode = R"(
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
contract test {
2-
}
3-
// ----
4-
// i_am_not_there() ->
1+
contract test {
2+
}
3+
// ----
4+
// i_am_not_there() ->

‎test/libsolidity/semanticTests/functionCall/transaction_status.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ contract test {
44
function h() public { assert(false); }
55
}
66
// ----
7-
// f() ->
7+
// f() ->
88
// g() -> FAILURE
99
// h() -> FAILURE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
contract test {
2+
}
3+
// ====
4+
// compileViaYul: true
5+
// ----
6+
// i_am_not_there() ->

0 commit comments

Comments
 (0)