Update test-cpp and simplify exception tests.