-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test, refactor: Magic bytes array followup #28857
test, refactor: Magic bytes array followup #28857
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Also remove an assert that is already enforced by the compiler checking that the length of the std::array matches.
151ad29
to
1e5b861
Compare
utACK 1e5b861 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm ACK 1e5b861
@@ -85,6 +85,8 @@ BOOST_AUTO_TEST_CASE(sizes) | |||
BOOST_CHECK_EQUAL(GetSerializeSize(int64_t(0), 0), 8U); | |||
BOOST_CHECK_EQUAL(GetSerializeSize(uint64_t(0), 0), 8U); | |||
BOOST_CHECK_EQUAL(GetSerializeSize(bool(0), 0), 1U); | |||
BOOST_CHECK_EQUAL(GetSerializeSize(std::array<uint8_t, 1>{0}, 0), 1U); | |||
BOOST_CHECK_EQUAL(GetSerializeSize(std::array<uint8_t, 2>{0, 0}, 0), 2U); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BOOST_CHECK_EQUAL(GetSerializeSize(std::array<uint8_t, 2>{0, 0}, 0), 2U); | |
BOOST_CHECK_EQUAL(GetSerializeSize(std::array<uint8_t, 2>{}, 0), 2U); |
nit: I think array will fill itself with zeros if they are omitted
This is a followup-PR for #28423