Skip to content

Remove trailing zeros from the output of BytesUtils::formatBytes#7538

Merged
chriseth merged 2 commits intoargotorg:developfrom
ghallak:7198-remove-padded-zeros
Oct 16, 2019
Merged

Remove trailing zeros from the output of BytesUtils::formatBytes#7538
chriseth merged 2 commits intoargotorg:developfrom
ghallak:7198-remove-padded-zeros

Conversation

@ghallak
Copy link
Copy Markdown
Contributor

@ghallak ghallak commented Oct 15, 2019

Closes #7198

@chriseth chriseth requested a review from erak October 15, 2019 14:10

/// Formats this function call test and applies the format that was detected during parsing.
/// If _renderResult is false, the expected result of the call will is used, if it's false
/// If _renderResult is false, the expected result of the call will be used, if it's true
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks!

case ABIType::String:
os << formatString(_bytes);
{
auto paddingZerosCnt = find_if(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to move this into its own function and then call it from here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe BytesUtils::countRightPaddedZeros?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done that here 8a8f553

Copy link
Copy Markdown
Collaborator

@erak erak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this PR. In general it looks good but I still left a tiny request for change.

@ghallak ghallak force-pushed the 7198-remove-padded-zeros branch from b7634b1 to 8a8f553 Compare October 16, 2019 12:11
@ghallak ghallak requested a review from erak October 16, 2019 12:20
@chriseth chriseth merged commit e626437 into argotorg:develop Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[isoltest] String formatting should not output padded zeros

3 participants