Added test offsets on C++ side.
R interface now allows setting test offset.
Additional test for offset.
Fixes for tests.