diff options
Diffstat (limited to 'googletest/samples/sample6_unittest.cc')
-rw-r--r-- | googletest/samples/sample6_unittest.cc | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/googletest/samples/sample6_unittest.cc b/googletest/samples/sample6_unittest.cc index 0266e27..cf576f0 100644 --- a/googletest/samples/sample6_unittest.cc +++ b/googletest/samples/sample6_unittest.cc @@ -27,13 +27,11 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // This sample shows how to test common properties of multiple // implementations of the same interface (aka interface tests). // The interface and its implementations are in this header. #include "prime_tables.h" - #include "gtest/gtest.h" namespace { // First, we define some factory functions for creating instances of @@ -73,8 +71,6 @@ class PrimeTableTest : public testing::Test { PrimeTable* const table_; }; -#if GTEST_HAS_TYPED_TEST - using testing::Types; // Google Test offers two ways for reusing tests for different types. @@ -134,10 +130,6 @@ TYPED_TEST(PrimeTableTest, CanGetNextPrime) { // in the type list specified in TYPED_TEST_SUITE. Sit back and be // happy that you don't have to define them multiple times. -#endif // GTEST_HAS_TYPED_TEST - -#if GTEST_HAS_TYPED_TEST_P - using testing::Types; // Sometimes, however, you don't yet know all the types that you want @@ -157,8 +149,7 @@ using testing::Types; // the PrimeTableTest fixture defined earlier: template <class T> -class PrimeTableTest2 : public PrimeTableTest<T> { -}; +class PrimeTableTest2 : public PrimeTableTest<T> {}; // Then, declare the test case. The argument is the name of the test // fixture, and also the name of the test case (as usual). The _P @@ -220,5 +211,4 @@ INSTANTIATE_TYPED_TEST_SUITE_P(OnTheFlyAndPreCalculated, // Instance name PrimeTableTest2, // Test case name PrimeTableImplementations); // Type list -#endif // GTEST_HAS_TYPED_TEST_P } // namespace |