Added a new test and applied clang-format
- By definition size of filter is fixed during construction
- New entry added at the end and topmost entry is removed when max size is reached.
Added a new test and applied clang-format
42 | + 43 | + filter.input(100); // 15 100 44 | + BOOST_CHECK_EQUAL(filter.size(), 2); 45 | + 46 | + filter.input(10); // 100 10 47 | + BOOST_CHECK_EQUAL(filter.size(), 2);
Maybe add an unsorted filter check like this?
BOOST_CHECK_EQUAL(filter[0], 100);
BOOST_CHECK_EQUAL(filter[1], 10);
Hi Jimmy. Class under test is not a vector, so index operations are not available. Otherwise good suggestion. Code is from 2014. Am focusing on tests in order to nail the contract as a basis for potential improvements in the future.
Ignore this, as I have a new pull request, that implements contract testing for the AddTimeData procedure.