Adds semantic tests to test framework and isoltest.

This commit is contained in:
Erik Kundt
2019-02-15 13:27:15 +01:00
committed by Erik Kundt
parent 190634e1f9
commit dacad629ef
12 changed files with 291 additions and 85 deletions
@@ -0,0 +1,17 @@
contract C {
function f() public returns (uint) {
return 1;
}
function g(uint x, uint y) public returns (uint) {
return x - y;
}
function h() public payable returns (uint) {
return f();
}
}
// ----
// f() -> 1
// g(uint256,uint256): 1, -2 -> 3
// h(), 1 ether -> 1
// j() -> FAILURE
// i() # Does not exist. # -> FAILURE # Reverts. #
@@ -0,0 +1,11 @@
contract C {
function f(uint a, uint b, uint c, uint d, uint e) public returns (uint) {
return a + b + c + d + e;
}
}
// ----
// f(uint256,uint256,uint256,uint256,uint256): 1, 1, 1, 1, 1
// -> 5
// g()
// # g() does not exist #
// -> FAILURE
@@ -0,0 +1,17 @@
contract C {
function f(uint a, uint b, uint c, uint d, uint e) public returns (uint) {
return a + b + c + d + e;
}
}
// ----
// f(uint256,uint256,uint256,uint256,uint256): 1, 1, 1, 1, 1
// # A comment on the function parameters. #
// -> 5
// f(uint256,uint256,uint256,uint256,uint256):
// 1,
// 1,
// 1,
// 1,
// 1
// -> 5
// # Should return sum of all parameters. #