proxygen
testing::SetUpTestCaseTest Class Reference
Inheritance diagram for testing::SetUpTestCaseTest:
testing::Test testing::Test testing::Test

Protected Member Functions

virtual void SetUp ()
 
virtual void SetUp ()
 
virtual void SetUp ()
 
- Protected Member Functions inherited from testing::Test
 Test ()
 
virtual void TearDown ()
 
 Test ()
 
virtual void TearDown ()
 
 Test ()
 
virtual void TearDown ()
 

Static Protected Member Functions

static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 

Static Protected Attributes

static int counter_ = 0
 
static const char * shared_resource_ = NULL
 

Additional Inherited Members

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
virtual ~Test ()
 
virtual ~Test ()
 
- Static Public Member Functions inherited from testing::Test
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 

Detailed Description

Definition at line 5392 of file gtest_unittest.cc.

Member Function Documentation

virtual void testing::SetUpTestCaseTest::SetUp ( )
inlineprotectedvirtual

Reimplemented from testing::Test.

Definition at line 5427 of file gtest_unittest.cc.

References counter_, and EXPECT_EQ.

5427  {
5428  // SetUpTestCase() should be called only once, so counter_ should
5429  // always be 1.
5430  EXPECT_EQ(1, counter_);
5431  }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
virtual void testing::SetUpTestCaseTest::SetUp ( )
inlineprotectedvirtual

Reimplemented from testing::Test.

Definition at line 5427 of file gtest_unittest.cc.

References counter_, counter_, EXPECT_EQ, EXPECT_STREQ, EXPECT_STRNE, shared_resource_, and testing::internal::TEST_F().

5427  {
5428  // SetUpTestCase() should be called only once, so counter_ should
5429  // always be 1.
5430  EXPECT_EQ(1, counter_);
5431  }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
virtual void testing::SetUpTestCaseTest::SetUp ( )
inlineprotectedvirtual

Reimplemented from testing::Test.

Definition at line 5427 of file gtest_unittest.cc.

References counter_, counter_, EXPECT_EQ, EXPECT_STREQ, EXPECT_STRNE, shared_resource_, and testing::internal::TEST_F().

5427  {
5428  // SetUpTestCase() should be called only once, so counter_ should
5429  // always be 1.
5430  EXPECT_EQ(1, counter_);
5431  }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
static void testing::SetUpTestCaseTest::SetUpTestCase ( )
inlinestaticprotected

Definition at line 5396 of file gtest_unittest.cc.

References counter_, and EXPECT_EQ.

5396  {
5397  printf("Setting up the test case . . .\n");
5398 
5399  // Initializes some shared resource. In this simple example, we
5400  // just create a C string. More complex stuff can be done if
5401  // desired.
5402  shared_resource_ = "123";
5403 
5404  // Increments the number of test cases that have been set up.
5405  counter_++;
5406 
5407  // SetUpTestCase() should be called only once.
5408  EXPECT_EQ(1, counter_);
5409  }
static const char * shared_resource_
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
static void testing::SetUpTestCaseTest::SetUpTestCase ( )
inlinestaticprotected

Definition at line 5396 of file gtest_unittest.cc.

References counter_, and EXPECT_EQ.

5396  {
5397  printf("Setting up the test case . . .\n");
5398 
5399  // Initializes some shared resource. In this simple example, we
5400  // just create a C string. More complex stuff can be done if
5401  // desired.
5402  shared_resource_ = "123";
5403 
5404  // Increments the number of test cases that have been set up.
5405  counter_++;
5406 
5407  // SetUpTestCase() should be called only once.
5408  EXPECT_EQ(1, counter_);
5409  }
static const char * shared_resource_
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
static void testing::SetUpTestCaseTest::SetUpTestCase ( )
inlinestaticprotected

Definition at line 5396 of file gtest_unittest.cc.

References counter_, and EXPECT_EQ.

5396  {
5397  printf("Setting up the test case . . .\n");
5398 
5399  // Initializes some shared resource. In this simple example, we
5400  // just create a C string. More complex stuff can be done if
5401  // desired.
5402  shared_resource_ = "123";
5403 
5404  // Increments the number of test cases that have been set up.
5405  counter_++;
5406 
5407  // SetUpTestCase() should be called only once.
5408  EXPECT_EQ(1, counter_);
5409  }
static const char * shared_resource_
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
static void testing::SetUpTestCaseTest::TearDownTestCase ( )
inlinestaticprotected

Definition at line 5413 of file gtest_unittest.cc.

References counter_, and EXPECT_EQ.

5413  {
5414  printf("Tearing down the test case . . .\n");
5415 
5416  // Decrements the number of test cases that have been set up.
5417  counter_--;
5418 
5419  // TearDownTestCase() should be called only once.
5420  EXPECT_EQ(0, counter_);
5421 
5422  // Cleans up the shared resource.
5423  shared_resource_ = NULL;
5424  }
static const char * shared_resource_
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
static void testing::SetUpTestCaseTest::TearDownTestCase ( )
inlinestaticprotected

Definition at line 5413 of file gtest_unittest.cc.

References counter_, and EXPECT_EQ.

5413  {
5414  printf("Tearing down the test case . . .\n");
5415 
5416  // Decrements the number of test cases that have been set up.
5417  counter_--;
5418 
5419  // TearDownTestCase() should be called only once.
5420  EXPECT_EQ(0, counter_);
5421 
5422  // Cleans up the shared resource.
5423  shared_resource_ = NULL;
5424  }
static const char * shared_resource_
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
static void testing::SetUpTestCaseTest::TearDownTestCase ( )
inlinestaticprotected

Definition at line 5413 of file gtest_unittest.cc.

References counter_, and EXPECT_EQ.

5413  {
5414  printf("Tearing down the test case . . .\n");
5415 
5416  // Decrements the number of test cases that have been set up.
5417  counter_--;
5418 
5419  // TearDownTestCase() should be called only once.
5420  EXPECT_EQ(0, counter_);
5421 
5422  // Cleans up the shared resource.
5423  shared_resource_ = NULL;
5424  }
static const char * shared_resource_
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922

Member Data Documentation

int testing::SetUpTestCaseTest::counter_ = 0
staticprotected

Definition at line 5434 of file gtest_unittest.cc.

Referenced by SetUp().

const char * testing::SetUpTestCaseTest::shared_resource_ = NULL
staticprotected

Definition at line 5437 of file gtest_unittest.cc.

Referenced by SetUp().


The documentation for this class was generated from the following file: