Imported Upstream version 1.12.0
[platform/upstream/gtest.git] / googletest / samples / sample5_unittest.cc
index 0a21dd2..cc8c0f0 100644 (file)
@@ -27,7 +27,6 @@
 // (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 teaches how to reuse a test fixture in multiple test
 // cases by deriving sub-fixtures from it.
 //
 
 #include <limits.h>
 #include <time.h>
-#include "gtest/gtest.h"
+
 #include "sample1.h"
 #include "sample3-inl.h"
+#include "gtest/gtest.h"
 namespace {
 // In this sample, we want to ensure that every test finishes within
 // ~5 seconds.  If a test takes longer to run, we consider it a
@@ -81,7 +81,6 @@ class QuickTest : public testing::Test {
   time_t start_time_;
 };
 
-
 // We derive a fixture named IntegerFunctionTest from the QuickTest
 // fixture.  All tests using this fixture will be automatically
 // required to be quick.
@@ -90,7 +89,6 @@ class IntegerFunctionTest : public QuickTest {
   // Therefore the body is empty.
 };
 
-
 // Now we can write tests in the IntegerFunctionTest test case.
 
 // Tests Factorial()
@@ -110,7 +108,6 @@ TEST_F(IntegerFunctionTest, Factorial) {
   EXPECT_EQ(40320, Factorial(8));
 }
 
-
 // Tests IsPrime()
 TEST_F(IntegerFunctionTest, IsPrime) {
   // Tests negative input.
@@ -131,7 +128,6 @@ TEST_F(IntegerFunctionTest, IsPrime) {
   EXPECT_TRUE(IsPrime(23));
 }
 
-
 // The next test case (named "QueueTest") also needs to be quick, so
 // we derive another fixture from QuickTest.
 //
@@ -163,13 +159,10 @@ class QueueTest : public QuickTest {
   Queue<int> q2_;
 };
 
-
 // Now, let's write tests using the QueueTest fixture.
 
 // Tests the default constructor.
-TEST_F(QueueTest, DefaultConstructor) {
-  EXPECT_EQ(0u, q0_.Size());
-}
+TEST_F(QueueTest, DefaultConstructor) { EXPECT_EQ(0u, q0_.Size()); }
 
 // Tests Dequeue().
 TEST_F(QueueTest, Dequeue) {