more train-test facilities for c++ interface