solidity/test/libsolidity/semanticTests/fixedPoint/conversion.sol
Alex Beregszaszi 698bfb3cb9 Add more tests
2021-08-16 12:14:21 +02:00

15 lines
381 B
Solidity

contract C {
function test() public pure returns (uint a, uint b, uint c, uint d) {
fixed64x4 x = -1.1234;
a = uint64(bytes8(x));
fixed64x2 y = fixed64x2(x);
b = uint64(bytes8(y));
fixed16x4 z = fixed16x4(x);
c = uint16(bytes2(z));
ufixed64x4 w = ufixed64x4(x);
d = uint64(bytes8(w));
}
}
// ---
// test() ->