Browse Source

Merge pull request #594 from imapp-pl/tests

Test unexpected storage entries
cl-refactor
Gav Wood 10 years ago
parent
commit
6366274bee
  1. 6
      test/TestHelper.cpp

6
test/TestHelper.cpp

@ -329,6 +329,12 @@ void checkStorage(map<u256, u256> _expectedStore, map<u256, u256> _resultStore,
BOOST_CHECK_MESSAGE(expectedStoreValue == resultStoreValue, _expectedAddr << ": store[" << expectedStoreKey << "] = " << resultStoreValue << ", expected " << expectedStoreValue); BOOST_CHECK_MESSAGE(expectedStoreValue == resultStoreValue, _expectedAddr << ": store[" << expectedStoreKey << "] = " << resultStoreValue << ", expected " << expectedStoreValue);
} }
} }
for (auto&& resultStorePair : _resultStore)
{
if (!_expectedStore.count(resultStorePair.first))
BOOST_ERROR(_expectedAddr << ": unexpected store key " << resultStorePair.first);
}
} }
void checkLog(LogEntries _resultLogs, LogEntries _expectedLogs) void checkLog(LogEntries _resultLogs, LogEntries _expectedLogs)

Loading…
Cancel
Save