fixup! Add more tests

This commit is contained in:
chriseth 2021-08-16 14:24:00 +02:00
parent 1c9baafe26
commit 0520a040de
4 changed files with 16 additions and 9 deletions

View File

@ -11,6 +11,5 @@ contract C {
}
}
// ----
// f() ->
// g() ->
// f() -> 10000, 11111111111111100000000000000000
// g() -> 0x20, 3, 998888888000000000000, 44110000000001100000, 888888888888888888440000100000000000

View File

@ -8,4 +8,4 @@ contract C {
}
// ----
// f() -> 307.213100000000000000
// g() -> 0.00
// g() -> -0.33

View File

@ -8,5 +8,5 @@ contract C {
}
}
// ----
// z() ->
// f() ->
// z() -> -9.300000000000000000
// f() -> 1.700000000000000000, -1.800000000000000000, -9.300000000000000000, -3.400000000000000000

View File

@ -12,10 +12,18 @@ contract C {
function getLowLevel() public view returns (bytes32 r) {
assembly { r := sload(0) }
}
function get() public view returns (uint8, bytes8, bytes2, uint8) {
function getIntermediate() public view returns (uint8, bytes8, bytes2, uint8) {
return (a, bytes8(b), bytes2(c), d);
}
function get() public view returns (uint8, fixed62x2, fixed16x5, uint8) {
return (a, b, c, d);
}
}
// ----
// z() ->
// f() ->
// getLowLevel() -> 0x00
// getIntermediate() ->
// get() -> 0, 0x00, 0x00, 0
// set() ->
// getLowLevel() -> 0x63cfccffffffffffffd72e01
// getIntermediate() ->
// get() -> 1, 0xffffffffffffd72e000000000000000000000000000000000000000000000000, 0xcfcc000000000000000000000000000000000000000000000000000000000000, 0x63