mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make tests more consistent in style
This commit is contained in:
parent
d2144b03c7
commit
ff756bc94d
@ -130,9 +130,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
|
|||||||
if (previousOwner != 0) {
|
if (previousOwner != 0) {
|
||||||
if (!record.owner.send(auction.sumOfBids - auction.highestBid / 100))
|
if (!record.owner.send(auction.sumOfBids - auction.highestBid / 100))
|
||||||
throw;
|
throw;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!auction.highestBidder.send(auction.highestBid - auction.secondHighestBid))
|
if (!auction.highestBidder.send(auction.highestBid - auction.secondHighestBid))
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -147,9 +145,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
|
|||||||
if (now < m_toRecord[_name].renewalDate)
|
if (now < m_toRecord[_name].renewalDate)
|
||||||
throw;
|
throw;
|
||||||
bid(_name, msg.sender, msg.value);
|
bid(_name, msg.sender, msg.value);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
Record record = m_toRecord[_name];
|
Record record = m_toRecord[_name];
|
||||||
if (record.owner != 0)
|
if (record.owner != 0)
|
||||||
throw;
|
throw;
|
||||||
|
@ -2549,10 +2549,11 @@ BOOST_AUTO_TEST_CASE(event)
|
|||||||
if (_manually) {
|
if (_manually) {
|
||||||
bytes32 s = 0x19dacbf83c5de6658e14cbf7bcae5c15eca2eedecf1c66fbca928e4d351bea0f;
|
bytes32 s = 0x19dacbf83c5de6658e14cbf7bcae5c15eca2eedecf1c66fbca928e4d351bea0f;
|
||||||
log3(bytes32(msg.value), s, bytes32(msg.sender), _id);
|
log3(bytes32(msg.value), s, bytes32(msg.sender), _id);
|
||||||
} else
|
} else {
|
||||||
Deposit(msg.sender, _id, msg.value);
|
Deposit(msg.sender, _id, msg.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)";
|
)";
|
||||||
compileAndRun(sourceCode);
|
compileAndRun(sourceCode);
|
||||||
u256 value(18);
|
u256 value(18);
|
||||||
|
@ -540,7 +540,7 @@ BOOST_AUTO_TEST_CASE(if_statement)
|
|||||||
{
|
{
|
||||||
char const* text = "contract test {\n"
|
char const* text = "contract test {\n"
|
||||||
" function fun(uint256 a) {\n"
|
" function fun(uint256 a) {\n"
|
||||||
" if (a >= 8) return 2; else { var b = 7; }\n"
|
" if (a >= 8) { return 2 }; else { var b = 7; }\n"
|
||||||
" }\n"
|
" }\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
BOOST_CHECK(successParse(text));
|
BOOST_CHECK(successParse(text));
|
||||||
|
Loading…
Reference in New Issue
Block a user