diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-11-10 19:17:35 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-11-10 19:17:35 +0000 |
commit | 4b88dddfe24f51a6cecedfde7cbb128029646e4f (patch) | |
tree | 37d724d53579343200b2ca5493edd8b291d0b297 /include/gtest/gtest-param-test.h.pump | |
parent | 122c66e14103ddfeeb5460f09cd389f3e9f0de1f (diff) | |
download | gtest-4b88dddfe24f51a6cecedfde7cbb128029646e4f.tar.gz gtest-4b88dddfe24f51a6cecedfde7cbb128029646e4f.tar.bz2 gtest-4b88dddfe24f51a6cecedfde7cbb128029646e4f.tar.xz |
Fixes the code to work with fuse_gtest.py.
git-svn-id: http://googletest.googlecode.com/svn/trunk@337 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'include/gtest/gtest-param-test.h.pump')
-rw-r--r-- | include/gtest/gtest-param-test.h.pump | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/gtest/gtest-param-test.h.pump b/include/gtest/gtest-param-test.h.pump index c761f12..a231188 100644 --- a/include/gtest/gtest-param-test.h.pump +++ b/include/gtest/gtest-param-test.h.pump @@ -52,7 +52,7 @@ $var maxtuple = 10 $$ Maximum number of Combine arguments we want to support. // class. It must be derived from testing::TestWithParam<T>, where T is // the type of your parameter values. TestWithParam<T> is itself derived // from testing::Test. T can be any copyable type. If it's a raw pointer, -// you are responsible for managing the lifespan of the pointed values. +// you are responsible for managing the lifespan of the pointed values. class FooTest : public ::testing::TestWithParam<const char*> { // You can implement all the usual class fixture members here. @@ -60,7 +60,7 @@ class FooTest : public ::testing::TestWithParam<const char*> { // Then, use the TEST_P macro to define as many parameterized tests // for this fixture as you want. The _P suffix is for "parameterized" -// or "pattern", whichever you prefer to think. +// or "pattern", whichever you prefer to think. TEST_P(FooTest, DoesBlah) { // Inside a test, access the test parameter with the GetParam() method @@ -124,7 +124,7 @@ const char* pets[] = {"cat", "dog"}; INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); // The tests from the instantiation above will have these names: -// +// // * AnotherInstantiationName/FooTest.DoesBlah/0 for "cat" // * AnotherInstantiationName/FooTest.DoesBlah/1 for "dog" // * AnotherInstantiationName/FooTest.HasBlahBlah/0 for "cat" @@ -147,17 +147,21 @@ INSTANTIATE_TEST_CASE_P(AnotherInstantiationName, FooTest, ValuesIn(pets)); #endif // 0 - -#include <utility> - #include <gtest/internal/gtest-port.h> -#if GTEST_HAS_PARAM_TEST +#if !GTEST_OS_SYMBIAN +#include <utility> +#endif +// scripts/fuse_gtest.py depends on gtest's own header being #included +// *unconditionally*. Therefore these #includes cannot be moved +// inside #if GTEST_HAS_PARAM_TEST. #include <gtest/internal/gtest-internal.h> #include <gtest/internal/gtest-param-util.h> #include <gtest/internal/gtest-param-util-generated.h> +#if GTEST_HAS_PARAM_TEST + namespace testing { // Functions producing parameter generators. |