mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fix emit statments being printed on the same line
Update test/libsolidity/semanticTests/emit_three_identical_events.sol Co-authored-by: Kamil Śliwak <cameel2@gmail.com> Update test/libsolidity/semanticTests/emit_two_identical_events.sol Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
This commit is contained in:
parent
84cdcec2cf
commit
54965fb0ae
@ -0,0 +1,14 @@
|
|||||||
|
contract C {
|
||||||
|
event Terminated();
|
||||||
|
|
||||||
|
function terminate() external {
|
||||||
|
emit Terminated();
|
||||||
|
emit Terminated();
|
||||||
|
emit Terminated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// terminate() ->
|
||||||
|
// ~ emit Terminated()
|
||||||
|
// ~ emit Terminated()
|
||||||
|
// ~ emit Terminated()
|
12
test/libsolidity/semanticTests/emit_two_identical_events.sol
Normal file
12
test/libsolidity/semanticTests/emit_two_identical_events.sol
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
contract C {
|
||||||
|
event Terminated();
|
||||||
|
|
||||||
|
function terminate() external {
|
||||||
|
emit Terminated();
|
||||||
|
emit Terminated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// terminate() ->
|
||||||
|
// ~ emit Terminated()
|
||||||
|
// ~ emit Terminated()
|
@ -208,12 +208,10 @@ string TestFunctionCall::format(
|
|||||||
if (!sideEffects.empty())
|
if (!sideEffects.empty())
|
||||||
{
|
{
|
||||||
stream << std::endl;
|
stream << std::endl;
|
||||||
for (string const& effect: sideEffects)
|
size_t i = 0;
|
||||||
{
|
for (; i < sideEffects.size() - 1; ++i)
|
||||||
stream << _linePrefix << "// ~ " << effect;
|
stream << _linePrefix << "// ~ " << sideEffects[i] << std::endl;
|
||||||
if (effect != *sideEffects.rbegin())
|
stream << _linePrefix << "// ~ " << sideEffects[i];
|
||||||
stream << std::endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stream << formatGasExpectations(_linePrefix, _renderMode == RenderMode::ExpectedValuesActualGas, _interactivePrint);
|
stream << formatGasExpectations(_linePrefix, _renderMode == RenderMode::ExpectedValuesActualGas, _interactivePrint);
|
||||||
|
Loading…
Reference in New Issue
Block a user