Add throw_test under cpp