From ff756bc94d7129844f8f3492cc07807a78b973bc Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Wed, 24 Aug 2016 15:31:59 -0400 Subject: Make tests more consistent in style --- test/contracts/AuctionRegistrar.cpp | 8 ++------ test/libsolidity/SolidityEndToEndTest.cpp | 3 ++- test/libsolidity/SolidityParser.cpp | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp index 3b1d1165..6eba2706 100644 --- a/test/contracts/AuctionRegistrar.cpp +++ b/test/contracts/AuctionRegistrar.cpp @@ -130,9 +130,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem { if (previousOwner != 0) { if (!record.owner.send(auction.sumOfBids - auction.highestBid / 100)) throw; - } - else - { + } else { if (!auction.highestBidder.send(auction.highestBid - auction.secondHighestBid)) throw; } @@ -147,9 +145,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem { if (now < m_toRecord[_name].renewalDate) throw; bid(_name, msg.sender, msg.value); - } - else - { + } else { Record record = m_toRecord[_name]; if (record.owner != 0) throw; diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 8a61907a..8f645170 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -2549,8 +2549,9 @@ BOOST_AUTO_TEST_CASE(event) if (_manually) { bytes32 s = 0x19dacbf83c5de6658e14cbf7bcae5c15eca2eedecf1c66fbca928e4d351bea0f; log3(bytes32(msg.value), s, bytes32(msg.sender), _id); - } else + } else { Deposit(msg.sender, _id, msg.value); + } } } )"; diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 909d18c9..07cb0751 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -540,7 +540,7 @@ BOOST_AUTO_TEST_CASE(if_statement) { char const* text = "contract test {\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"; BOOST_CHECK(successParse(text)); -- cgit v1.2.3 From a8c5d2bbde73e13dc2fc2e002bab0bd39536f162 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Wed, 31 Aug 2016 09:55:28 -0400 Subject: Fix syntax error --- test/libsolidity/SolidityParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 07cb0751..92f5a142 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -540,7 +540,7 @@ BOOST_AUTO_TEST_CASE(if_statement) { char const* text = "contract test {\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"; BOOST_CHECK(successParse(text)); -- cgit v1.2.3