Tests : timedata : median file filter shall not grow beyond size #14761

pull mmachicao wants to merge 7 commits into bitcoin:master from mmachicao:timedata_tests changing 1 files +18 −1
  1. mmachicao commented at 6:04 PM on November 19, 2018: contributor

    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.
  2. timedata : unittest : median file filter shall not grow beyond size 58f8924543
  3. fanquake added the label Tests on Nov 19, 2018
  4. in src/test/timedata_tests.cpp:41 in 58f8924543 outdated
      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);
    


    practicalswift commented at 12:37 PM on November 20, 2018:

    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 :-)


    laanwj commented at 10:30 AM on November 22, 2018:

    Also: please use four spaces for indentation


  5. laanwj commented at 10:30 AM on November 22, 2018: member

    thanks for adding tests!

    utACK, apart from style nits

  6. applied clang-format 7205e7ac05
  7. MarcoFalke commented at 6:57 PM on November 23, 2018: member
  8. timedata : unittest : median file filter shall not grow beyond size
    applied clang-format
    6f1a6a199e
  9. Merge branch 'timedata_tests' of https://github.com/mmachicao/bitcoin into timedata_tests b1033bda6a
  10. Merge branch 'timedata_tests' of https://github.com/mmachicao/bitcoin into timedata_tests 106ed7f01c
  11. timedata : unittest : median file filter shall not grow beyond size
    applied clang-format
    
    applied clang-format
    d3194236d2
  12. Merge branch 'timedata_tests' of https://github.com/mmachicao/bitcoin into timedata_tests
    Local branch diverged from remote branch
    725e7cd4d1
  13. mmachicao commented at 9:59 PM on November 24, 2018: contributor

    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.

  14. mmachicao closed this on Nov 24, 2018

  15. mmachicao deleted the branch on Dec 6, 2018
  16. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me