make testcase const and use insert instead of push_backs