Test the contract of CMedianFilter and it's behavior when adding new entries into the filter.
- List of entries has fixed size
- New entries are added at the end.
- Surplus entries are removed from the front.
Test the contract of CMedianFilter and it's behavior when adding new entries into the filter.
33 | @@ -34,4 +34,22 @@ BOOST_AUTO_TEST_CASE(util_MedianFilter) 34 | BOOST_CHECK_EQUAL(filter.median(), 7); 35 | } 36 | 37 | + 38 | +BOOST_AUTO_TEST_CASE(util_MedianFilterShallNotGrowBeyondSize) 39 | +{ 40 | + 41 | + CMedianFilter<int> filter(2,15);
Nit: Run this through clang-format on the new code to make sure the formatting is consistent with the style guide. Or simply replace "," with ", " throughout this PR :-)
Also: please use four spaces for indentation
thanks for adding tests!
utACK, apart from style nits
Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits
applied clang-format
applied clang-format
applied clang-format
Local branch diverged from remote branch
Sorry guys. Got confused with git. Closing this request and replacing with a new one matching your requirements on a different branch. At this moment I am more interested on contributing the test rather than dealing with git.