Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

Addresses review feedback from PR #808 to replace C-style array patterns with modern C++ idioms in FunctionalTests.cpp.

Changes

  • Replace C-style array with std::array<TestData, 8> for compile-time size tracking
  • Replace sizeof(test_data)/sizeof(test_data[0]) with .size() method call
  • Change loop iterator from int to size_t for type consistency
  • Extract anonymous struct to named TestData struct for clarity

Before:

const struct {
    double now;
    // ... fields
} test_data[] = { /* data */ };

for(int i=1; i<sizeof(test_data)/sizeof(test_data[0]); i++)

After:

struct TestData {
    double now;
    // ... fields
};
const std::array<TestData, 8> test_data{{ /* data */ }};

for(size_t i=1; i<test_data.size(); i++)

Maintains C++11 compatibility as required by the test suite build configuration.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

pstroffolino and others added 27 commits December 30, 2025 15:36
Reason for Change: test code for profiling abr algorithms

Signed-off-by: Philip Stroffolino <[email protected]>
Signed-off-by: Philip Stroffolino <[email protected]>
… removing libcurl dependencies

Signed-off-by: Philip Stroffolino <[email protected]>
Signed-off-by: Philip Stroffolino <[email protected]>
Signed-off-by: Philip Stroffolino <[email protected]>
Signed-off-by: Philip Stroffolino <[email protected]>
Signed-off-by: Philip Stroffolino <[email protected]>
Signed-off-by: Philip Stroffolino <[email protected]>
Copilot AI changed the title [WIP] Update ewma algorithm testing based on feedback Modernize C-style array to std::array in NetworkBandwidthEstimator tests Jan 2, 2026
Copilot AI requested a review from pstroffolino January 2, 2026 22:50
Base automatically changed from feature/VPLAY-12274-abr to dev_sprint_25_2 January 3, 2026 21:28
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