aboutsummaryrefslogtreecommitdiff
path: root/googletest/samples/sample1_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/samples/sample1_unittest.cc')
-rw-r--r--googletest/samples/sample1_unittest.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/googletest/samples/sample1_unittest.cc b/googletest/samples/sample1_unittest.cc
index cb08b61a..60f2770c 100644
--- a/googletest/samples/sample1_unittest.cc
+++ b/googletest/samples/sample1_unittest.cc
@@ -34,14 +34,15 @@
//
// Writing a unit test using Google C++ testing framework is easy as 1-2-3:
-
// Step 1. Include necessary header files such that the stuff your
// test logic needs is declared.
//
// Don't forget gtest.h, which declares the testing framework.
-#include <limits.h>
#include "sample1.h"
+
+#include <limits.h>
+
#include "gtest/gtest.h"
namespace {
@@ -69,7 +70,6 @@ namespace {
//
// </TechnicalDetails>
-
// Tests Factorial().
// Tests factorial of negative numbers.
@@ -97,9 +97,7 @@ TEST(FactorialTest, Negative) {
}
// Tests factorial of 0.
-TEST(FactorialTest, Zero) {
- EXPECT_EQ(1, Factorial(0));
-}
+TEST(FactorialTest, Zero) { EXPECT_EQ(1, Factorial(0)); }
// Tests factorial of positive numbers.
TEST(FactorialTest, Positive) {
@@ -109,7 +107,6 @@ TEST(FactorialTest, Positive) {
EXPECT_EQ(40320, Factorial(8));
}
-
// Tests IsPrime()
// Tests negative input.