Tests should have "before" and "after" cases side by side, so that it's
possible to easily verify that full context is extracted correctly.
Also tests should consistently cover the same conditions in all the
different scenarios.
This also specifies what exactly getContext*() functions do. Before this
commit linesCount was sometimes interpreted as exclusive of current
line, which was confusing as linesCount + 1 lines were being returned.
Currently the current line is duplicated in both "before" and "after"
context. This is due to DocumentContextReader::readWholeFileAfter()
picking the current line part of which has been already included into
the "before" context.
chore: Add unit tests for DocumentContextReader
The tests are based on GTest like some tests in Qt Creator itself, which
makes it easy to run as full Qt Creator does not need to be started.