Updated test.cc to allow gtest to catch exceptions when using Clang or GCC.