tests: cpp: fixed accidental test exit
tests: cpp: added explicit test for remove_data_range
tests: cpp: simplified range tests
tests: cpp: removed unused code