lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Unit test for PDF get_extra_pages_needed() function


From: Vadim Zeitlin
Subject: [lmi] Unit test for PDF get_extra_pages_needed() function
Date: Tue, 6 Feb 2018 23:22:28 +0100

 Hello,

 I've extracted the logic of one of the two PDF pagination functions (the
one which was easier to refactor) in a new get_needed_pages_count() in
miscellany.hpp and added a simple unit test for it checking for all the
problematic cases encountered so far, please see

        https://github.com/vadz/lmi/pull/64

 I'm not sure if this function is really appropriate for miscellany.hpp as
it's very PDF-specific and is unlikely to be reused elsewhere. OTOH it is a
pure function similar to the other ones already present in this header and
miscellany_test.cpp looked like the most appropriate place for the new unit
test as nothing else seemed to fit and it doesn't seem to merit a whole new
test neither.

 Of course, if you disagree with this, please let me know where would you
prefer to put it and/or move it to a better place yourself.

 Thanks in advance,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]