| 48 | BOOST_FIXTURE_TEST_SUITE(ABIEncoderTest, SolidityExecutionFramework) |
| 49 | |
| 50 | BOOST_AUTO_TEST_CASE(value_types) |
| 51 | { |
| 52 | std::string sourceCode = R"( |
| 53 | contract C { |
| 54 | event E(uint a, uint16 b, uint24 c, int24 d, bytes3 x, bool, C); |
| 55 | function f() public { |
| 56 | bytes6 x = hex"1bababababa2"; |
| 57 | bool b; |
| 58 | assembly { b := 7 } |
| 59 | C c; |
| 60 | assembly { c := sub(0, 5) } |
| 61 | emit E(10, uint16(type(uint).max - 1), uint24(uint(0x12121212)), int24(int256(-1)), bytes3(x), b, c); |
| 62 | } |
| 63 | } |
| 64 | )"; |
| 65 | BOTH_ENCODERS( |
| 66 | compileAndRun(sourceCode); |
| 67 | callContractFunction("f()"); |
| 68 | REQUIRE_LOG_DATA(encodeArgs( |
| 69 | 10, u256(65534), u256(0x121212), u256(-1), std::string("\x1b\xab\xab"), true, h160("fffffffffffffffffffffffffffffffffffffffb") |
| 70 | )); |
| 71 | ) |
| 72 | } |
| 73 | |
| 74 | BOOST_AUTO_TEST_CASE(string_literal) |
| 75 | { |
no test coverage detected