Add some tests for cpp generator