doc & cpp test.