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

Fix a bug in the simple test #44

Merged
merged 1 commit into from
Dec 7, 2016

Conversation

sujin-philip
Copy link
Contributor

The number of elements in the sizes array is 10 not 11.

The number of elements in the sizes array is 10 not 11.
@@ -94,11 +94,13 @@ TEST_CASE_METHOD(SimpleFixture, "Send/Recv Test", "[simple]")

// atleast one message needs to be >2GB to test for the case of multi-piece
// messages
std::size_t sizes[11] = { 288, 128, 64, 32, 64, 32, 32, 64, 32, 32 };
static const std::size_t sizes[] = { 288, 128, 64, 32, 64, 32, 32, 64, 32, 32 };
Copy link
Member

Choose a reason for hiding this comment

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

Why not make it std::array<size_t> or even std::vector<size_t>? Then sizes.size() would work below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You need to explicitly specify the size in std::array, which will have to be changed whenever the list is changed. This way you can add or remove entries from the list and the size is computed by the compiler. This just seemed more convenient to me.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, good point about array, although the point about vector stands. But it's a very minor point. Let's not worry about it. I'll merge in the change now.

@mrzv mrzv merged commit cb341e9 into diatomic:master Dec 7, 2016
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