summaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/weakref/weakref_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-11 12:29:46 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-08-11 12:30:24 +0200
commit41709673f0165f16496ecf37162ed7dac06b5295 (patch)
treec213da683873bbe88927a3de58eb93f3f231a693 /vespalib/src/tests/weakref/weakref_test.cpp
parent2fe073e8e1875bc891c38099c880d156bd228e9d (diff)
Use std::atomic all over and completely get rid of homegrown atomics.
Diffstat (limited to 'vespalib/src/tests/weakref/weakref_test.cpp')
-rw-r--r--vespalib/src/tests/weakref/weakref_test.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/vespalib/src/tests/weakref/weakref_test.cpp b/vespalib/src/tests/weakref/weakref_test.cpp
deleted file mode 100644
index bf85edbc15f..00000000000
--- a/vespalib/src/tests/weakref/weakref_test.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include <vespa/vespalib/util/weakref.h>
-#include <vespa/vespalib/testkit/testapp.h>
-
-using vespalib::WeakRef;
-
-class Test : public vespalib::TestApp
-{
-public:
- int getFive() { return 5; }
- void testSimple();
- int Main() override;
-};
-
-
-void
-Test::testSimple()
-{
- WeakRef<Test>::Owner owner(this);
- WeakRef<Test> ref(owner);
- {
- WeakRef<Test>::Usage use(ref);
- ASSERT_TRUE(use.valid());
- EXPECT_TRUE(use->getFive() == 5);
- }
- owner.clear();
- {
- WeakRef<Test>::Usage use(ref);
- EXPECT_TRUE(!use.valid());
- }
-}
-
-
-int
-Test::Main()
-{
- TEST_INIT("weakref_test");
- testSimple();
- TEST_DONE();
-}
-
-TEST_APPHOOK(Test)