summaryrefslogtreecommitdiff
path: root/samples/sample1_unittest.cc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-15 16:11:41 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-15 16:32:35 +0100
commitd94f158aa6a1faa0f0825f333769617dd1269e9f (patch)
tree80954989318559133fd444ee7ee3be78cff90887 /samples/sample1_unittest.cc
parent42552c3316326dfd84e8285672b33b78a1a6a4ee (diff)
Google C++ Testing Framework 1.8.1HEADmaster
Diffstat (limited to 'samples/sample1_unittest.cc')
-rw-r--r--samples/sample1_unittest.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/samples/sample1_unittest.cc b/samples/sample1_unittest.cc
index aefc4f1..cb08b61 100644
--- a/samples/sample1_unittest.cc
+++ b/samples/sample1_unittest.cc
@@ -28,9 +28,6 @@
// 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)
-
// This sample shows how to write a simple unit test for a function,
// using Google C++ testing framework.
@@ -46,7 +43,7 @@
#include <limits.h>
#include "sample1.h"
#include "gtest/gtest.h"
-
+namespace {
// Step 2. Use the TEST macro to define your tests.
//
@@ -139,6 +136,7 @@ TEST(IsPrimeTest, Positive) {
EXPECT_FALSE(IsPrime(6));
EXPECT_TRUE(IsPrime(23));
}
+} // namespace
// Step 3. Call RUN_ALL_TESTS() in main().
//