aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-02-14 06:47:55 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-02-14 06:48:50 +0800
commit9836d58df8372fe13590c61ad8ebce7cfbe32015 (patch)
treef2bb35369a2a3efd4db30f69f6a0b53eafea61b8
parent8e9a9ad5e9c4ab4fe08626ef3972983b69b198a4 (diff)
downloaddexon-solidity-9836d58df8372fe13590c61ad8ebce7cfbe32015.tar.gz
dexon-solidity-9836d58df8372fe13590c61ad8ebce7cfbe32015.tar.zst
dexon-solidity-9836d58df8372fe13590c61ad8ebce7cfbe32015.zip
Removing ';' from the end of EnumDefinition
-rw-r--r--SolidityEndToEndTest.cpp2
-rw-r--r--SolidityNameAndTypeResolution.cpp12
-rw-r--r--SolidityParser.cpp6
3 files changed, 10 insertions, 10 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index 551607df..2ef2b803 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -2503,7 +2503,7 @@ BOOST_AUTO_TEST_CASE(using_enums)
{
char const* sourceCode = R"(
contract test {
- enum ActionChoices { GoLeft, GoRight, GoStraight, Sit };
+ enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
function test()
{
choices = ActionChoices.GoStraight;
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp
index f3edfc31..ec49a42d 100644
--- a/SolidityNameAndTypeResolution.cpp
+++ b/SolidityNameAndTypeResolution.cpp
@@ -996,7 +996,7 @@ BOOST_AUTO_TEST_CASE(enum_member_access)
{
char const* text = R"(
contract test {
- enum ActionChoices { GoLeft, GoRight, GoStraight, Sit };
+ enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
function test()
{
choices = ActionChoices.GoStraight;
@@ -1011,7 +1011,7 @@ BOOST_AUTO_TEST_CASE(enum_invalid_member_access)
{
char const* text = R"(
contract test {
- enum ActionChoices { GoLeft, GoRight, GoStraight, Sit };
+ enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
function test()
{
choices = ActionChoices.RunAroundWavingYourHands;
@@ -1026,7 +1026,7 @@ BOOST_AUTO_TEST_CASE(enum_explicit_conversion_is_okay)
{
char const* text = R"(
contract test {
- enum ActionChoices { GoLeft, GoRight, GoStraight, Sit };
+ enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
function test()
{
a = uint256(ActionChoices.GoStraight);
@@ -1043,7 +1043,7 @@ BOOST_AUTO_TEST_CASE(int_to_enum_explicit_conversion_is_okay)
{
char const* text = R"(
contract test {
- enum ActionChoices { GoLeft, GoRight, GoStraight, Sit };
+ enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
function test()
{
a = 2;
@@ -1060,7 +1060,7 @@ BOOST_AUTO_TEST_CASE(enum_implicit_conversion_is_not_okay)
{
char const* text = R"(
contract test {
- enum ActionChoices { GoLeft, GoRight, GoStraight, Sit };
+ enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
function test()
{
a = ActionChoices.GoStraight;
@@ -1077,7 +1077,7 @@ BOOST_AUTO_TEST_CASE(enum_duplicate_values)
{
char const* text = R"(
contract test {
- enum ActionChoices { GoLeft, GoRight, GoLeft, Sit };
+ enum ActionChoices { GoLeft, GoRight, GoLeft, Sit }
}
)";
BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError);
diff --git a/SolidityParser.cpp b/SolidityParser.cpp
index 702d1d6d..af82f612 100644
--- a/SolidityParser.cpp
+++ b/SolidityParser.cpp
@@ -707,7 +707,7 @@ BOOST_AUTO_TEST_CASE(enum_valid_declaration)
{
char const* text = R"(
contract c {
- enum validEnum { Value1, Value2, Value3, Value4 };
+ enum validEnum { Value1, Value2, Value3, Value4 }
function c ()
{
a = foo.Value3;
@@ -721,7 +721,7 @@ BOOST_AUTO_TEST_CASE(empty_enum_declaration)
{
char const* text = R"(
contract c {
- enum foo { };
+ enum foo { }
})";
BOOST_CHECK_NO_THROW(parseTextExplainError(text));
}
@@ -730,7 +730,7 @@ BOOST_AUTO_TEST_CASE(malformed_enum_declaration)
{
char const* text = R"(
contract c {
- enum foo { WARNING,};
+ enum foo { WARNING,}
})";
BOOST_CHECK_THROW(parseText(text), ParserError);
}