aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityOptimizer.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-05-16 21:52:24 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-05-16 21:52:24 +0800
commitadce9ca812bd0c8a79e1bc924ad70773bb9006b1 (patch)
tree5ece8e3a172203f47ed8e45d73943d97990f3eb8 /test/libsolidity/SolidityOptimizer.cpp
parent1e45d3ab2e0ca688c2ae48ab657f11496ccebc12 (diff)
downloaddexon-solidity-adce9ca812bd0c8a79e1bc924ad70773bb9006b1.tar.gz
dexon-solidity-adce9ca812bd0c8a79e1bc924ad70773bb9006b1.tar.zst
dexon-solidity-adce9ca812bd0c8a79e1bc924ad70773bb9006b1.zip
Tidy up tests to always have closing braces on the proper line
Diffstat (limited to 'test/libsolidity/SolidityOptimizer.cpp')
-rw-r--r--test/libsolidity/SolidityOptimizer.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityOptimizer.cpp b/test/libsolidity/SolidityOptimizer.cpp
index 5326feaf..afce1823 100644
--- a/test/libsolidity/SolidityOptimizer.cpp
+++ b/test/libsolidity/SolidityOptimizer.cpp
@@ -139,7 +139,8 @@ BOOST_AUTO_TEST_CASE(smoke_test)
function f(uint a) returns (uint b) {
return a;
}
- })";
+ }
+ )";
compileBothVersions(sourceCode);
compareVersions("f(uint256)", u256(7));
}
@@ -151,7 +152,8 @@ BOOST_AUTO_TEST_CASE(identities)
function f(int a) returns (int b) {
return int(0) | (int(1) * (int(0) ^ (0 + a)));
}
- })";
+ }
+ )";
compileBothVersions(sourceCode);
compareVersions("f(int256)", u256(0x12334664));
}
@@ -165,7 +167,8 @@ BOOST_AUTO_TEST_CASE(unused_expressions)
10 + 20;
data;
}
- })";
+ }
+ )";
compileBothVersions(sourceCode);
compareVersions("f()");
}
@@ -180,7 +183,8 @@ BOOST_AUTO_TEST_CASE(constant_folding_both_sides)
function f(uint x) returns (uint y) {
return 98 ^ (7 * ((1 | (x | 1000)) * 40) ^ 102);
}
- })";
+ }
+ )";
compileBothVersions(sourceCode);
compareVersions("f(uint256)", 7);
}