Skip to content
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

Add tests for expanding an unpacker buffer #380

Merged
merged 1 commit into from
Nov 1, 2015

Conversation

whoshuu
Copy link
Contributor

@whoshuu whoshuu commented Oct 27, 2015

No description provided.

@redboltz
Copy link
Contributor

Thank you for sending the PR. The tests are kind of white box tests. They are testing a implementation detail.

If the test is for interface, then

    EXPECT_TRUE(original_capacity + 1u <= u.buffer_capacity());

should be used instead of

    EXPECT_EQ((original_capacity + COUNTER_SIZE) * 2 - COUNTER_SIZE, u.buffer_capacity());

However, I think that tests for implementation are worth to have. If implementation would be changed, tests would also be changed. So I will merge the PR.

redboltz added a commit that referenced this pull request Nov 1, 2015
Add tests for expanding an unpacker buffer
@redboltz redboltz merged commit f58eb11 into msgpack:master Nov 1, 2015
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.

2 participants