Unit test for abort(3).

Change-Id: I021604b977572801f228a193741624df26e76d72
This commit is contained in:
Elliott Hughes 2014-09-22 14:41:30 -07:00
parent adc01348ee
commit 60452a211c
1 changed files with 5 additions and 0 deletions

View File

@ -462,3 +462,8 @@ TEST(unistd, getpid_caching_and_pthread_create) {
ASSERT_EQ(0, pthread_join(t, &result));
ASSERT_EQ(NULL, result);
}
TEST(unistd_DeathTest, abort) {
::testing::FLAGS_gtest_death_test_style = "threadsafe";
ASSERT_EXIT(abort(), testing::KilledBySignal(SIGABRT), "");
}