mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
style fixes
This commit is contained in:
parent
47f0e847e5
commit
945418cc10
@ -4145,7 +4145,7 @@ BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor_call_fail)
|
|||||||
uint public test = 1;
|
uint public test = 1;
|
||||||
function testIt()
|
function testIt()
|
||||||
{
|
{
|
||||||
A a;
|
A a = new A();
|
||||||
++test;
|
++test;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,6 @@ public:
|
|||||||
m_compiler.reset(false, m_addStandardSources);
|
m_compiler.reset(false, m_addStandardSources);
|
||||||
m_compiler.addSource("", _sourceCode);
|
m_compiler.addSource("", _sourceCode);
|
||||||
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize), "Compiling contract failed");
|
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize), "Compiling contract failed");
|
||||||
|
|
||||||
bytes code = m_compiler.getBytecode(_contractName);
|
bytes code = m_compiler.getBytecode(_contractName);
|
||||||
sendMessage(code, true, _value);
|
sendMessage(code, true, _value);
|
||||||
return m_output;
|
return m_output;
|
||||||
@ -80,16 +79,15 @@ public:
|
|||||||
bytes solidityResult = callContractFunction(_sig, _arguments...);
|
bytes solidityResult = callContractFunction(_sig, _arguments...);
|
||||||
bytes cppResult = callCppAndEncodeResult(_cppFunction, _arguments...);
|
bytes cppResult = callCppAndEncodeResult(_cppFunction, _arguments...);
|
||||||
BOOST_CHECK_MESSAGE(
|
BOOST_CHECK_MESSAGE(
|
||||||
solidityResult == cppResult, "Computed values do not match.\nSolidity: " + toHex(solidityResult) + "\nC++: " + toHex(cppResult));
|
solidityResult == cppResult,
|
||||||
|
"Computed values do not match.\nSolidity: " +
|
||||||
|
toHex(solidityResult) +
|
||||||
|
"\nC++: " +
|
||||||
|
toHex(cppResult));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class CppFunction, class... Args>
|
template <class CppFunction, class... Args>
|
||||||
void testSolidityAgainstCppOnRange(
|
void testSolidityAgainstCppOnRange(std::string _sig, CppFunction const& _cppFunction, u256 const& _rangeStart, u256 const& _rangeEnd)
|
||||||
std::string _sig,
|
|
||||||
CppFunction const& _cppFunction,
|
|
||||||
u256 const& _rangeStart,
|
|
||||||
u256 const& _rangeEnd
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
for (u256 argument = _rangeStart; argument < _rangeEnd; ++argument)
|
for (u256 argument = _rangeStart; argument < _rangeEnd; ++argument)
|
||||||
{
|
{
|
||||||
@ -150,10 +148,10 @@ protected:
|
|||||||
{
|
{
|
||||||
m_state.addBalance(m_sender, _value); // just in case
|
m_state.addBalance(m_sender, _value); // just in case
|
||||||
eth::Executive executive(m_state, eth::LastHashes(), 0);
|
eth::Executive executive(m_state, eth::LastHashes(), 0);
|
||||||
eth::Transaction t = _isCreation ? eth::Transaction(
|
eth::Transaction t =
|
||||||
_value, m_gasPrice, m_gas, _data, 0, KeyPair::create().sec()
|
_isCreation ?
|
||||||
) : eth::Transaction(_value, m_gasPrice, m_gas, m_contractAddress, _data, 0, KeyPair::create().sec());
|
eth::Transaction(_value, m_gasPrice, m_gas, _data, 0, KeyPair::create().sec()) :
|
||||||
|
eth::Transaction(_value, m_gasPrice, m_gas, m_contractAddress, _data, 0, KeyPair::create().sec());
|
||||||
bytes transactionRLP = t.rlp();
|
bytes transactionRLP = t.rlp();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user