aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/sharedptr/ptrholder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib/src/tests/sharedptr/ptrholder.cpp')
-rw-r--r--vespalib/src/tests/sharedptr/ptrholder.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/vespalib/src/tests/sharedptr/ptrholder.cpp b/vespalib/src/tests/sharedptr/ptrholder.cpp
index 8dc3bba2722..e6d1710247b 100644
--- a/vespalib/src/tests/sharedptr/ptrholder.cpp
+++ b/vespalib/src/tests/sharedptr/ptrholder.cpp
@@ -1,20 +1,11 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/util/ptrholder.h>
-#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/gtest/gtest.h>
using vespalib::PtrHolder;
-class Test : public vespalib::TestApp
-{
-public:
- void testEmpty();
- void testSimple();
- int Main() override;
-};
-
-
struct Data
{
int ctorCnt;
@@ -39,8 +30,7 @@ using PT = std::shared_ptr<DataRef>;
using HOLD = PtrHolder<DataRef>;
-void
-Test::testEmpty()
+TEST(PtrHolderTest, test_empty)
{
HOLD hold;
EXPECT_TRUE(hold.get().get() == NULL);
@@ -56,8 +46,7 @@ Test::testEmpty()
}
-void
-Test::testSimple()
+TEST(PtrHolderTest, test_simple)
{
Data data;
HOLD hold;
@@ -86,14 +75,4 @@ Test::testSimple()
EXPECT_TRUE(data.dtorCnt == 2);
}
-
-int
-Test::Main()
-{
- TEST_INIT("ptrholder_test");
- testEmpty();
- testSimple();
- TEST_DONE();
-}
-
-TEST_APPHOOK(Test)
+GTEST_MAIN_RUN_ALL_TESTS()