Hi hackers, >> Again, I don't have a strong opinion here. If you insist, I will place the >> tests to regress.c. > > It is up to committer to decide, but I think it would be good to place tests > in regression. In my opinion, many things from core may be used by extensions. > And then it is up to extension authors to make relevant tests. > > For me, it's enough to make a reasonable test coverage for SLRU without > investing too much effort into generalization.
OK, here is an updated version of the patch. Changes comparing to v1: * Tests are moved to regress.c, as asked by the majority; * SimpleLruInit() returns void as before, per Daniel's feedback; * Most of the initial refactorings were reverted in order to keep the patch as small as possible, per Maxim's feedback. LCOV indicates 65% of code coverage in terms of lines of code. I'm currently working on improving this number. More feedback is always welcome! -- Best regards, Aleksander Alekseev
v2-0001-Unit-tests-for-SLRU.patch
Description: Binary data