Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
CommonTest< T > Class Template Reference
Inheritance diagram for CommonTest< T >:
Collaboration diagram for CommonTest< T >:

Static Public Member Functions

static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
- 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)
 

Protected Types

typedef std::vector< TVector
 
typedef std::set< int > IntSet
 

Protected Member Functions

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

Protected Attributes

T value_
 

Static Protected Attributes

static Tshared_ = NULL
 

Additional Inherited Members

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 

Detailed Description

template<typename T>
class CommonTest< T >

Definition at line 45 of file gtest-typed-test_test.cc.

Member Typedef Documentation

◆ IntSet

template<typename T >
std::set<int> CommonTest< T >::IntSet
protected

Definition at line 64 of file gtest-typed-test_test.cc.

◆ Vector

template<typename T >
std::vector<T> CommonTest< T >::Vector
protected

Definition at line 63 of file gtest-typed-test_test.cc.

Constructor & Destructor Documentation

◆ CommonTest()

template<typename T >
CommonTest< T >::CommonTest ( )
inlineprotected

Definition at line 66 of file gtest-typed-test_test.cc.

◆ ~CommonTest()

template<typename T >
virtual CommonTest< T >::~CommonTest ( )
inlineprotectedvirtual

Definition at line 68 of file gtest-typed-test_test.cc.

68{ EXPECT_EQ(3, value_); }
#define EXPECT_EQ(val1, val2)
Definition gtest.h:1954

Member Function Documentation

◆ SetUp()

template<typename T >
virtual void CommonTest< T >::SetUp ( )
inlineprotectedvirtual

Reimplemented from testing::Test.

Definition at line 70 of file gtest-typed-test_test.cc.

70 {
71 EXPECT_EQ(1, value_);
72 value_++;
73 }

◆ SetUpTestCase()

template<typename T >
static void CommonTest< T >::SetUpTestCase ( )
inlinestatic

Definition at line 49 of file gtest-typed-test_test.cc.

49 {
50 shared_ = new T(5);
51 }
#define T(meth, val, expected)

◆ TearDown()

template<typename T >
virtual void CommonTest< T >::TearDown ( )
inlineprotectedvirtual

Reimplemented from testing::Test.

Definition at line 75 of file gtest-typed-test_test.cc.

75 {
76 EXPECT_EQ(2, value_);
77 value_++;
78 }

◆ TearDownTestCase()

template<typename T >
static void CommonTest< T >::TearDownTestCase ( )
inlinestatic

Definition at line 53 of file gtest-typed-test_test.cc.

53 {
54 delete shared_;
55 shared_ = NULL;
56 }

Member Data Documentation

◆ shared_

template<typename T >
T * CommonTest< T >::shared_ = NULL
staticprotected

Definition at line 81 of file gtest-typed-test_test.cc.

◆ value_

template<typename T >
T CommonTest< T >::value_
protected

Definition at line 80 of file gtest-typed-test_test.cc.


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