Browse Source

fixing solidity tests

cl-refactor
arkpar 10 years ago
parent
commit
c72564d25c
  1. 2
      libethcore/BlockInfo.cpp
  2. 2
      test/libsolidity/SolidityEndToEndTest.cpp
  3. 6
      test/libsolidity/solidityExecutionFramework.h

2
libethcore/BlockInfo.cpp

@ -186,7 +186,7 @@ void BlockInfo::populateFromParent(BlockInfo const& _parent)
m_gasLimit = selectGasLimit(_parent);
m_gasUsed = 0;
m_difficulty = calculateDifficulty(_parent);
m_parentHash = _parent.hash();
m_parentHash = _parent.m_hash;
}
u256 BlockInfo::selectGasLimit(BlockInfo const& _parent) const

2
test/libsolidity/SolidityEndToEndTest.cpp

@ -1188,7 +1188,7 @@ BOOST_AUTO_TEST_CASE(now)
{
char const* sourceCode = "contract test {\n"
" function someInfo() returns (bool success) {\n"
" return block.timestamp() == now && now > 0;\n"
" return block.timestamp == now && now > 0;\n"
" }\n"
"}\n";
compileAndRun(sourceCode);

6
test/libsolidity/solidityExecutionFramework.h

@ -41,7 +41,11 @@ namespace test
class ExecutionFramework
{
public:
ExecutionFramework() { g_logVerbosity = 0; }
ExecutionFramework()
{
g_logVerbosity = 0;
m_state.resetCurrent();
}
bytes const& compileAndRunWithoutCheck(
std::string const& _sourceCode,

Loading…
Cancel
Save