Fix boolean constants.

This commit is contained in:
chriseth
2017-11-22 02:35:34 +00:00
committed by Alex Beregszaszi
parent 90fb14f525
commit 95a65dc04c
2 changed files with 16 additions and 14 deletions
+9 -12
View File
@@ -362,18 +362,15 @@ BOOST_AUTO_TEST_CASE(constant_condition)
}
)";
CHECK_WARNING(text, "Condition is always false");
// TODO
// // a plain literal constant is fine
// text = R"(
// contract C {
// function f(uint x) public pure {
// if (true) { revert(); }
// }
// }
// )";
// CHECK_SUCCESS_NO_WARNINGS(text);
// TODO test unreacheable code
// a plain literal constant is fine
text = R"(
contract C {
function f(uint) public pure {
if (true) { revert(); }
}
}
)";
CHECK_SUCCESS_NO_WARNINGS(text);
}
BOOST_AUTO_TEST_SUITE_END()