tests: cpp: do not test indexes twice