Improves thread-safe death tests by changing to the original working directory before they are executed; also fixes out-dated comments about death tests.

This commit is contained in:
shiqian
2008-09-12 04:01:37 +00:00
parent 29d8235540
commit 019d19af97
10 changed files with 198 additions and 46 deletions

View File

@@ -1142,7 +1142,8 @@ TEST(ParseInt32FlagTest, ParsesAndReturnsValidValue) {
}
// For the same reason we are not explicitly testing everything in the
// Test class, there are no separate tests for the following classes:
// Test class, there are no separate tests for the following classes
// (except for some trivial cases):
//
// TestCase, UnitTest, UnitTestResultPrinter.
//
@@ -1150,6 +1151,11 @@ TEST(ParseInt32FlagTest, ParsesAndReturnsValidValue) {
//
// TEST, TEST_F, RUN_ALL_TESTS
TEST(UnitTestTest, CanGetOriginalWorkingDir) {
ASSERT_TRUE(UnitTest::GetInstance()->original_working_dir() != NULL);
EXPECT_STRNE(UnitTest::GetInstance()->original_working_dir(), "");
}
// This group of tests is for predicate assertions (ASSERT_PRED*, etc)
// of various arities. They do not attempt to be exhaustive. Rather,
// view them as smoke tests that can be easily reviewed and verified.