forked from ethereum/solidity
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TestFunctionCall::formatRawParameters(): Ensure that uint8_t overload…
… of toHex() is called - Wrong overload results in isoltest padding each char to 32 bytes
- Loading branch information
Showing
3 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
test/libsolidity/semanticTests/isoltestTesting/format_raw_string_with_control_chars.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
contract C { | ||
function f(string memory s) external pure returns (string memory) { | ||
return s; | ||
} | ||
} | ||
// NOTE: The test is here to illustrate the problem with formatting control chars in strings in | ||
// test expectations but unfortunately it can only be triggered manually. It does not test anything | ||
// unless you introduce a difference in expectations to force isoltest to reformat them. | ||
// ==== | ||
// compileViaYul: also | ||
// ---- | ||
// f(string): 0x20, 16, "\xf0\x9f\x98\x83\xf0\x9f\x98\x83\xf0\x9f\x98\x83\xf0\x9f\x98\x83" -> 0x20, 16, "\xf0\x9f\x98\x83\xf0\x9f\x98\x83\xf0\x9f\x98\x83\xf0\x9f\x98\x83" # Input/Output: "😃😃😃😃" # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters