Skip to content

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