Index: ext/googletest/googletest/samples/sample3_unittest.cc =================================================================== diff -u -N -r4a481bbe77043e0bda2435c6d62a02700b3e46c5 -r3d5880c6661c3ed500e0c1c739a923ae9ede0364 --- ext/googletest/googletest/samples/sample3_unittest.cc (.../sample3_unittest.cc) (revision 4a481bbe77043e0bda2435c6d62a02700b3e46c5) +++ ext/googletest/googletest/samples/sample3_unittest.cc (.../sample3_unittest.cc) (revision 3d5880c6661c3ed500e0c1c739a923ae9ede0364) @@ -28,10 +28,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A sample program demonstrating using Google C++ testing framework. -// -// Author: wan@google.com (Zhanyong Wan) - // In this example, we use a more advanced feature of Google Test called // test fixture. // @@ -65,14 +62,14 @@ #include "sample3-inl.h" #include "gtest/gtest.h" - +namespace { // To use a test fixture, derive a class from testing::Test. -class QueueTest : public testing::Test { +class QueueTestSmpl3 : public testing::Test { protected: // You should make the members protected s.t. they can be // accessed from sub-classes. // virtual void SetUp() will be called before each test is run. You - // should define it if you need to initialize the varaibles. + // should define it if you need to initialize the variables. // Otherwise, this can be skipped. virtual void SetUp() { q1_.Enqueue(1); @@ -120,13 +117,13 @@ // instead of TEST. // Tests the default c'tor. -TEST_F(QueueTest, DefaultConstructor) { +TEST_F(QueueTestSmpl3, DefaultConstructor) { // You can access data in the test fixture here. EXPECT_EQ(0u, q0_.Size()); } // Tests Dequeue(). -TEST_F(QueueTest, Dequeue) { +TEST_F(QueueTestSmpl3, Dequeue) { int * n = q0_.Dequeue(); EXPECT_TRUE(n == NULL); @@ -144,8 +141,9 @@ } // Tests the Queue::Map() function. -TEST_F(QueueTest, Map) { +TEST_F(QueueTestSmpl3, Map) { MapTester(&q0_); MapTester(&q1_); MapTester(&q2_); } +} // namespace