mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Some more test fixes.
This commit is contained in:
parent
e5db096da9
commit
c0bbd1cfe5
@ -421,7 +421,7 @@ BOOST_AUTO_TEST_CASE(auction_simple)
|
||||
registrar.reserve(name);
|
||||
BOOST_CHECK_EQUAL(registrar.owner(name), 0);
|
||||
// "wait" until auction end
|
||||
m_envInfo.setTimestamp(m_envInfo.timestamp() + m_biddingTime + 10);
|
||||
m_rpc.test_modifyTimestamp(currentTimestamp() + m_biddingTime + 10);
|
||||
// trigger auction again
|
||||
registrar.reserve(name);
|
||||
BOOST_CHECK_EQUAL(registrar.owner(name), m_sender);
|
||||
|
@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(double_reserve)
|
||||
BOOST_REQUIRE(callContractFunctionWithValue("reserve(string)", m_fee, encodeDyn(name)) == encodeArgs());
|
||||
BOOST_CHECK(callContractFunction("owner(string)", encodeDyn(name)) == encodeArgs(h256(account(0), h256::AlignRight)));
|
||||
|
||||
sendEther(account(1), 10 * eth::ether);
|
||||
sendEther(account(1), 100 * eth::ether);
|
||||
m_sender = account(1);
|
||||
BOOST_REQUIRE(callContractFunctionWithValue("reserve(string)", m_fee, encodeDyn(name)) == encodeArgs());
|
||||
BOOST_CHECK(callContractFunction("owner(string)", encodeDyn(name)) == encodeArgs(h256(account(0), h256::AlignRight)));
|
||||
@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE(properties)
|
||||
{
|
||||
addr++;
|
||||
m_sender = account(0);
|
||||
sendEther(account(count), 10 * eth::ether);
|
||||
sendEther(account(count), 100 * eth::ether);
|
||||
m_sender = account(count);
|
||||
Address owner = m_sender;
|
||||
// setting by sender works
|
||||
@ -204,7 +204,8 @@ BOOST_AUTO_TEST_CASE(properties)
|
||||
BOOST_CHECK(callContractFunction("content(string)", encodeDyn(name)) == encodeArgs(addr + 90));
|
||||
count++;
|
||||
// but not by someone else
|
||||
sendEther(account(count), 10 * eth::ether);
|
||||
m_sender = account(0);
|
||||
sendEther(account(count), 100 * eth::ether);
|
||||
m_sender = account(count);
|
||||
BOOST_CHECK(callContractFunction("owner(string)", encodeDyn(name)) == encodeArgs(h256(owner, h256::AlignRight)));
|
||||
BOOST_CHECK(callContractFunction("setAddr(string,address)", u256(0x40), addr + 1, u256(name.length()), name) == encodeArgs());
|
||||
|
@ -48,7 +48,7 @@ string getIPCSocketPath()
|
||||
if (auto path = getenv("ETH_TEST_IPC"))
|
||||
ipcPath = path;
|
||||
if (ipcPath.empty())
|
||||
BOOST_FAIL("ERROR: ipcPath not set! (use --ipc <path>)");
|
||||
BOOST_FAIL("ERROR: ipcPath not set! (use --ipc <path> or the environment variable ETH_TEST_IPC)");
|
||||
return ipcPath;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user