- conversion of positive literals to signed int

- tests
This commit is contained in:
Liana Husikyan
2015-06-04 11:48:09 +02:00
parent 5ef445f64f
commit c7e6bbb82c
2 changed files with 44 additions and 0 deletions
+4
View File
@@ -4177,10 +4177,14 @@ BOOST_AUTO_TEST_CASE(positive_integers_to_signed)
char const* sourceCode = R"(
contract test {
int8 public x = 2;
int8 public y = 127;
int16 public q = 250;
}
)";
compileAndRun(sourceCode, 0, "test");
BOOST_CHECK(callContractFunction("x()") == encodeArgs(2));
BOOST_CHECK(callContractFunction("y()") == encodeArgs(127));
BOOST_CHECK(callContractFunction("q()") == encodeArgs(250));
}
BOOST_AUTO_TEST_SUITE_END()