]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/googletest/googletest/samples/sample1_unittest.cc
import 15.2.0 Octopus source
[ceph.git] / ceph / src / googletest / googletest / samples / sample1_unittest.cc
index aefc4f1d866e809332a45f9a0e2193c6f45badb9..cb08b61a59a9e16b3657861f1c9609001d2096b2 100644 (file)
@@ -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().
 //