test for cxx api