added test for end-of-object to distinct command cpp