diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-07-22 02:16:37 (GMT) |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-07-22 02:16:37 (GMT) |
commit | 16b9431ae01d83de80db7ef3e411d9771ee845e4 (patch) | |
tree | f3f577a111e7b489673c0a48be6c5264bef3e1f2 /test | |
parent | c214ebc830aa918d54e535c6caa2da6317877e12 (diff) | |
download | googletest-16b9431ae01d83de80db7ef3e411d9771ee845e4.zip googletest-16b9431ae01d83de80db7ef3e411d9771ee845e4.tar.gz googletest-16b9431ae01d83de80db7ef3e411d9771ee845e4.tar.bz2 |
Makes gtest compile clean with gcc -Wall -Werror (by Zhanyong Wan); refactors scons script (by Vlad Losev).
Diffstat (limited to 'test')
-rw-r--r-- | test/gtest-death-test_test.cc | 6 | ||||
-rw-r--r-- | test/gtest-port_test.cc | 8 | ||||
-rw-r--r-- | test/gtest-typed-test_test.cc | 4 | ||||
-rw-r--r-- | test/gtest-typed-test_test.h | 2 | ||||
-rw-r--r-- | test/gtest_output_test_.cc | 4 | ||||
-rw-r--r-- | test/gtest_output_test_golden_lin.txt | 6 | ||||
-rw-r--r-- | test/gtest_output_test_golden_win.txt | 6 | ||||
-rwxr-xr-x | test/run_tests_test.py | 147 |
8 files changed, 84 insertions, 99 deletions
diff --git a/test/gtest-death-test_test.cc b/test/gtest-death-test_test.cc index e9317e1..d5f1598 100644 --- a/test/gtest-death-test_test.cc +++ b/test/gtest-death-test_test.cc @@ -1057,16 +1057,16 @@ TEST(ParseNaturalNumberTest, AcceptsValidNumbers) { result = 0; ASSERT_TRUE(ParseNaturalNumber(String("123"), &result)); - EXPECT_EQ(123, result); + EXPECT_EQ(123U, result); // Check 0 as an edge case. result = 1; ASSERT_TRUE(ParseNaturalNumber(String("0"), &result)); - EXPECT_EQ(0, result); + EXPECT_EQ(0U, result); result = 1; ASSERT_TRUE(ParseNaturalNumber(String("00000"), &result)); - EXPECT_EQ(0, result); + EXPECT_EQ(0U, result); } TEST(ParseNaturalNumberTest, AcceptsTypeLimits) { diff --git a/test/gtest-port_test.cc b/test/gtest-port_test.cc index 37880a7..49af8b9 100644 --- a/test/gtest-port_test.cc +++ b/test/gtest-port_test.cc @@ -91,7 +91,7 @@ void* ThreadFunc(void* data) { } TEST(GetThreadCountTest, ReturnsCorrectValue) { - EXPECT_EQ(1, GetThreadCount()); + EXPECT_EQ(1U, GetThreadCount()); pthread_mutex_t mutex; pthread_attr_t attr; pthread_t thread_id; @@ -106,7 +106,7 @@ TEST(GetThreadCountTest, ReturnsCorrectValue) { const int status = pthread_create(&thread_id, &attr, &ThreadFunc, &mutex); ASSERT_EQ(0, pthread_attr_destroy(&attr)); ASSERT_EQ(0, status); - EXPECT_EQ(2, GetThreadCount()); + EXPECT_EQ(2U, GetThreadCount()); pthread_mutex_unlock(&mutex); void* dummy; @@ -124,12 +124,12 @@ TEST(GetThreadCountTest, ReturnsCorrectValue) { time.tv_nsec = 100L * 1000 * 1000; // .1 seconds. nanosleep(&time, NULL); } - EXPECT_EQ(1, GetThreadCount()); + EXPECT_EQ(1U, GetThreadCount()); pthread_mutex_destroy(&mutex); } #else TEST(GetThreadCountTest, ReturnsZeroWhenUnableToCountThreads) { - EXPECT_EQ(0, GetThreadCount()); + EXPECT_EQ(0U, GetThreadCount()); } #endif // GTEST_OS_MAC diff --git a/test/gtest-typed-test_test.cc b/test/gtest-typed-test_test.cc index eb921a0..8e86ac8 100644 --- a/test/gtest-typed-test_test.cc +++ b/test/gtest-typed-test_test.cc @@ -100,10 +100,10 @@ TYPED_TEST(CommonTest, ValuesAreCorrect) { // Typedefs in the fixture class template can be visited via the // "typename TestFixture::" prefix. typename TestFixture::List empty; - EXPECT_EQ(0, empty.size()); + EXPECT_EQ(0U, empty.size()); typename TestFixture::IntSet empty2; - EXPECT_EQ(0, empty2.size()); + EXPECT_EQ(0U, empty2.size()); // Non-static members of the fixture class must be visited via // 'this', as required by C++ for class templates. diff --git a/test/gtest-typed-test_test.h b/test/gtest-typed-test_test.h index ecbe5b3..40dfeac 100644 --- a/test/gtest-typed-test_test.h +++ b/test/gtest-typed-test_test.h @@ -55,7 +55,7 @@ TYPED_TEST_P(ContainerTest, CanBeDefaultConstructed) { TYPED_TEST_P(ContainerTest, InitialSizeIsZero) { TypeParam container; - EXPECT_EQ(0, container.size()); + EXPECT_EQ(0U, container.size()); } REGISTER_TYPED_TEST_CASE_P(ContainerTest, diff --git a/test/gtest_output_test_.cc b/test/gtest_output_test_.cc index 693df3f..6d75602 100644 --- a/test/gtest_output_test_.cc +++ b/test/gtest_output_test_.cc @@ -743,11 +743,11 @@ class TypedTestP : public testing::Test { TYPED_TEST_CASE_P(TypedTestP); TYPED_TEST_P(TypedTestP, Success) { - EXPECT_EQ(0, TypeParam()); + EXPECT_EQ(0U, TypeParam()); } TYPED_TEST_P(TypedTestP, Failure) { - EXPECT_EQ(1, TypeParam()) << "Expected failure"; + EXPECT_EQ(1U, TypeParam()) << "Expected failure"; } REGISTER_TYPED_TEST_CASE_P(TypedTestP, Success, Failure); diff --git a/test/gtest_output_test_golden_lin.txt b/test/gtest_output_test_golden_lin.txt index 46a90fb..51bae52 100644 --- a/test/gtest_output_test_golden_lin.txt +++ b/test/gtest_output_test_golden_lin.txt @@ -390,7 +390,8 @@ Expected failure gtest_output_test_.cc:#: Failure Value of: TypeParam() Actual: \0 -Expected: 1 +Expected: 1U +Which is: 1 Expected failure [0;31m[ FAILED ] [mUnsigned/TypedTestP/0.Failure [0;32m[----------] [m2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned int @@ -400,7 +401,8 @@ Expected failure gtest_output_test_.cc:#: Failure Value of: TypeParam() Actual: 0 -Expected: 1 +Expected: 1U +Which is: 1 Expected failure [0;31m[ FAILED ] [mUnsigned/TypedTestP/1.Failure [0;32m[----------] [m4 tests from ExpectFailureTest diff --git a/test/gtest_output_test_golden_win.txt b/test/gtest_output_test_golden_win.txt index 92fe7f4..313c3aa 100644 --- a/test/gtest_output_test_golden_win.txt +++ b/test/gtest_output_test_golden_win.txt @@ -376,7 +376,8 @@ Expected failure [ RUN ] Unsigned/TypedTestP/0.Failure gtest_output_test_.cc:#: error: Value of: TypeParam() Actual: \0 -Expected: 1 +Expected: 1U +Which is: 1 Expected failure [ FAILED ] Unsigned/TypedTestP/0.Failure [----------] 2 tests from Unsigned/TypedTestP/1, where TypeParam = unsigned int @@ -385,7 +386,8 @@ Expected failure [ RUN ] Unsigned/TypedTestP/1.Failure gtest_output_test_.cc:#: error: Value of: TypeParam() Actual: 0 -Expected: 1 +Expected: 1U +Which is: 1 Expected failure [ FAILED ] Unsigned/TypedTestP/1.Failure [----------] 4 tests from ExpectFailureTest diff --git a/test/run_tests_test.py b/test/run_tests_test.py index 2582262..79524a6 100755 --- a/test/run_tests_test.py +++ b/test/run_tests_test.py @@ -41,6 +41,12 @@ import unittest sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), os.pardir)) import run_tests + +GTEST_DBG_DIR = 'scons/build/dbg/scons' +GTEST_OPT_DIR = 'scons/build/opt/scons' +GTEST_OTHER_DIR = 'scons/build/other/scons' + + def AddExeExtension(path): """Appends .exe to the path on Windows or Cygwin.""" @@ -182,10 +188,9 @@ class GetTestsToRunTest(unittest.TestCase): def setUp(self): self.fake_os = FakeOs(FakePath( current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=[ - AddExeExtension('scons/build/dbg/gtest/scons/gtest_unittest'), - AddExeExtension('scons/build/opt/gtest/scons/gtest_unittest'), - 'test/gtest_color_test.py'])) + known_paths=[AddExeExtension(GTEST_DBG_DIR + '/gtest_unittest'), + AddExeExtension(GTEST_OPT_DIR + '/gtest_unittest'), + 'test/gtest_color_test.py'])) self.fake_configurations = ['dbg', 'opt'] self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, injected_subprocess=None, @@ -202,19 +207,17 @@ class GetTestsToRunTest(unittest.TestCase): False, available_configurations=self.fake_configurations), ([], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')])) + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) # An explicitly specified directory. self.AssertResultsEqual( self.test_runner.GetTestsToRun( - ['scons/build/dbg/gtest/scons', 'gtest_unittest'], + [GTEST_DBG_DIR, 'gtest_unittest'], '', False, available_configurations=self.fake_configurations), ([], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')])) + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) # A particular configuration. self.AssertResultsEqual( @@ -224,8 +227,7 @@ class GetTestsToRunTest(unittest.TestCase): False, available_configurations=self.fake_configurations), ([], - [('scons/build/other/gtest/scons', - 'scons/build/other/gtest/scons/gtest_unittest')])) + [(GTEST_OTHER_DIR, GTEST_OTHER_DIR + '/gtest_unittest')])) # All available configurations self.AssertResultsEqual( @@ -235,10 +237,8 @@ class GetTestsToRunTest(unittest.TestCase): False, available_configurations=self.fake_configurations), ([], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest'), - ('scons/build/opt/gtest/scons', - 'scons/build/opt/gtest/scons/gtest_unittest')])) + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest'), + (GTEST_OPT_DIR, GTEST_OPT_DIR + '/gtest_unittest')])) # All built configurations (unbuilt don't cause failure). self.AssertResultsEqual( @@ -248,47 +248,40 @@ class GetTestsToRunTest(unittest.TestCase): True, available_configurations=self.fake_configurations + ['unbuilt']), ([], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest'), - ('scons/build/opt/gtest/scons', - 'scons/build/opt/gtest/scons/gtest_unittest')])) + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest'), + (GTEST_OPT_DIR, GTEST_OPT_DIR + '/gtest_unittest')])) # A combination of an explicit directory and a configuration. self.AssertResultsEqual( self.test_runner.GetTestsToRun( - ['scons/build/dbg/gtest/scons', 'gtest_unittest'], + [GTEST_DBG_DIR, 'gtest_unittest'], 'opt', False, available_configurations=self.fake_configurations), ([], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest'), - ('scons/build/opt/gtest/scons', - 'scons/build/opt/gtest/scons/gtest_unittest')])) + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest'), + (GTEST_OPT_DIR, GTEST_OPT_DIR + '/gtest_unittest')])) # Same test specified in an explicit directory and via a configuration. self.AssertResultsEqual( self.test_runner.GetTestsToRun( - ['scons/build/dbg/gtest/scons', 'gtest_unittest'], + [GTEST_DBG_DIR, 'gtest_unittest'], 'dbg', False, available_configurations=self.fake_configurations), ([], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')])) + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) # All built configurations + explicit directory + explicit configuration. self.AssertResultsEqual( self.test_runner.GetTestsToRun( - ['scons/build/dbg/gtest/scons', 'gtest_unittest'], + [GTEST_DBG_DIR, 'gtest_unittest'], 'opt', True, available_configurations=self.fake_configurations), ([], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest'), - ('scons/build/opt/gtest/scons', - 'scons/build/opt/gtest/scons/gtest_unittest')])) + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest'), + (GTEST_OPT_DIR, GTEST_OPT_DIR + '/gtest_unittest')])) def testPythonTestsOnly(self): """Exercises GetTestsToRun with parameters designating Python tests only.""" @@ -300,17 +293,17 @@ class GetTestsToRunTest(unittest.TestCase): '', False, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], [])) # An explicitly specified directory. self.AssertResultsEqual( self.test_runner.GetTestsToRun( - ['scons/build/dbg/gtest/scons', 'test/gtest_color_test.py'], + [GTEST_DBG_DIR, 'test/gtest_color_test.py'], '', False, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], [])) # A particular configuration. @@ -320,7 +313,7 @@ class GetTestsToRunTest(unittest.TestCase): 'other', False, available_configurations=self.fake_configurations), - ([('scons/build/other/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_OTHER_DIR, 'test/gtest_color_test.py')], [])) # All available configurations @@ -330,8 +323,8 @@ class GetTestsToRunTest(unittest.TestCase): 'all', False, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py'), - ('scons/build/opt/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py'), + (GTEST_OPT_DIR, 'test/gtest_color_test.py')], [])) # All built configurations (unbuilt don't cause failure). @@ -341,40 +334,40 @@ class GetTestsToRunTest(unittest.TestCase): '', True, available_configurations=self.fake_configurations + ['unbuilt']), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py'), - ('scons/build/opt/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py'), + (GTEST_OPT_DIR, 'test/gtest_color_test.py')], [])) # A combination of an explicit directory and a configuration. self.AssertResultsEqual( self.test_runner.GetTestsToRun( - ['scons/build/dbg/gtest/scons', 'gtest_color_test.py'], + [GTEST_DBG_DIR, 'gtest_color_test.py'], 'opt', False, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py'), - ('scons/build/opt/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py'), + (GTEST_OPT_DIR, 'test/gtest_color_test.py')], [])) # Same test specified in an explicit directory and via a configuration. self.AssertResultsEqual( self.test_runner.GetTestsToRun( - ['scons/build/dbg/gtest/scons', 'gtest_color_test.py'], + [GTEST_DBG_DIR, 'gtest_color_test.py'], 'dbg', False, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], [])) # All built configurations + explicit directory + explicit configuration. self.AssertResultsEqual( self.test_runner.GetTestsToRun( - ['scons/build/dbg/gtest/scons', 'gtest_color_test.py'], + [GTEST_DBG_DIR, 'gtest_color_test.py'], 'opt', True, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py'), - ('scons/build/opt/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py'), + (GTEST_OPT_DIR, 'test/gtest_color_test.py')], [])) def testCombinationOfBinaryAndPythonTests(self): @@ -389,9 +382,8 @@ class GetTestsToRunTest(unittest.TestCase): '', False, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py')], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')])) + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) # Specifying both binary and Python tests. self.AssertResultsEqual( @@ -400,9 +392,8 @@ class GetTestsToRunTest(unittest.TestCase): '', False, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py')], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')])) + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) # Specifying binary tests suppresses Python tests. self.AssertResultsEqual( @@ -412,8 +403,7 @@ class GetTestsToRunTest(unittest.TestCase): False, available_configurations=self.fake_configurations), ([], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')])) + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')])) # Specifying Python tests suppresses binary tests. self.AssertResultsEqual( @@ -422,7 +412,7 @@ class GetTestsToRunTest(unittest.TestCase): '', False, available_configurations=self.fake_configurations), - ([('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py')], + ([(GTEST_DBG_DIR, 'test/gtest_color_test.py')], [])) def testIgnoresNonTestFiles(self): @@ -430,9 +420,8 @@ class GetTestsToRunTest(unittest.TestCase): self.fake_os = FakeOs(FakePath( current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=[ - AddExeExtension('scons/build/dbg/gtest/scons/gtest_nontest'), - 'test/'])) + known_paths=[AddExeExtension(GTEST_DBG_DIR + '/gtest_nontest'), + 'test/'])) self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, injected_subprocess=None, injected_script_dir='.') @@ -453,8 +442,8 @@ class GetTestsToRunTest(unittest.TestCase): current_dir=os.path.abspath('/a/b/c'), known_paths=[ '/a/b/c/', - AddExeExtension('/d/scons/build/dbg/gtest/scons/gtest_unittest'), - AddExeExtension('/d/scons/build/opt/gtest/scons/gtest_unittest'), + AddExeExtension('/d/' + GTEST_DBG_DIR + '/gtest_unittest'), + AddExeExtension('/d/' + GTEST_OPT_DIR + '/gtest_unittest'), '/d/test/gtest_color_test.py'])) self.fake_configurations = ['dbg', 'opt'] self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, @@ -468,8 +457,7 @@ class GetTestsToRunTest(unittest.TestCase): False, available_configurations=self.fake_configurations), ([], - [('/d/scons/build/dbg/gtest/scons', - '/d/scons/build/dbg/gtest/scons/gtest_unittest')])) + [('/d/' + GTEST_DBG_DIR, '/d/' + GTEST_DBG_DIR + '/gtest_unittest')])) # A Python test. self.AssertResultsEqual( @@ -478,8 +466,7 @@ class GetTestsToRunTest(unittest.TestCase): '', False, available_configurations=self.fake_configurations), - ([('/d/scons/build/dbg/gtest/scons', '/d/test/gtest_color_test.py')], - [])) + ([('/d/' + GTEST_DBG_DIR, '/d/test/gtest_color_test.py')], [])) def testNonTestBinary(self): @@ -508,7 +495,7 @@ class GetTestsToRunTest(unittest.TestCase): self.fake_os = FakeOs(FakePath( current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), - known_paths=['scons/build/dbg/gtest/scons/gtest_test', 'test/'])) + known_paths=['/d/' + GTEST_DBG_DIR + '/gtest_test', 'test/'])) self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, injected_subprocess=None, injected_script_dir='.') @@ -540,8 +527,8 @@ class RunTestsTest(unittest.TestCase): self.fake_os = FakeOs(FakePath( current_dir=os.path.abspath(os.path.dirname(run_tests.__file__)), known_paths=[ - AddExeExtension('scons/build/dbg/gtest/scons/gtest_unittest'), - AddExeExtension('scons/build/opt/gtest/scons/gtest_unittest'), + AddExeExtension(GTEST_DBG_DIR + '/gtest_unittest'), + AddExeExtension(GTEST_OPT_DIR + '/gtest_unittest'), 'test/gtest_color_test.py'])) self.fake_configurations = ['dbg', 'opt'] self.test_runner = run_tests.TestRunner(injected_os=self.fake_os, @@ -554,7 +541,7 @@ class RunTestsTest(unittest.TestCase): self.fake_os.spawn_impl = self.SpawnSuccess self.assertEqual( self.test_runner.RunTests( - [('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py')], + [(GTEST_DBG_DIR, 'test/gtest_color_test.py')], []), 0) self.assertEqual(self.num_spawn_calls, 1) @@ -566,8 +553,7 @@ class RunTestsTest(unittest.TestCase): self.assertEqual( self.test_runner.RunTests( [], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')]), + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')]), 0) self.assertEqual(self.num_spawn_calls, 1) @@ -577,7 +563,7 @@ class RunTestsTest(unittest.TestCase): self.fake_os.spawn_impl = self.SpawnFailure self.assertEqual( self.test_runner.RunTests( - [('scons/build/dbg/gtest/scons', 'test/gtest_color_test.py')], + [(GTEST_DBG_DIR, 'test/gtest_color_test.py')], []), 1) self.assertEqual(self.num_spawn_calls, 1) @@ -589,8 +575,7 @@ class RunTestsTest(unittest.TestCase): self.assertEqual( self.test_runner.RunTests( [], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')]), + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')]), 1) self.assertEqual(self.num_spawn_calls, 1) @@ -600,10 +585,8 @@ class RunTestsTest(unittest.TestCase): self.fake_os.spawn_impl = self.SpawnSuccess self.assertEqual( self.test_runner.RunTests( - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')]), + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')], + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')]), 0) self.assertEqual(self.num_spawn_calls, 2) @@ -621,10 +604,8 @@ class RunTestsTest(unittest.TestCase): self.fake_os.spawn_impl = SpawnImpl self.assertEqual( self.test_runner.RunTests( - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')], - [('scons/build/dbg/gtest/scons', - 'scons/build/dbg/gtest/scons/gtest_unittest')]), + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')], + [(GTEST_DBG_DIR, GTEST_DBG_DIR + '/gtest_unittest')]), 0) self.assertEqual(self.num_spawn_calls, 2) |