summaryrefslogtreecommitdiff
path: root/util/no_destructor_test.cc
diff options
context:
space:
mode:
authorVictor Costan <costan@google.com>2019-11-21 13:09:53 -0800
committerVictor Costan <pwnall@chromium.org>2019-11-21 13:11:40 -0800
commit1c58902bdcc8d129f3883606bbd8e59085b48878 (patch)
tree8ca631cdc3575fa2f33be0dc28b9d94d610202a1 /util/no_destructor_test.cc
parent2c9c80bd539ca5aad5ea864ee6dd81c1ee3eb91e (diff)
downloadleveldb-1c58902bdcc8d129f3883606bbd8e59085b48878.tar.gz
Switch testing harness to googletest.
PiperOrigin-RevId: 281815695
Diffstat (limited to 'util/no_destructor_test.cc')
-rw-r--r--util/no_destructor_test.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/util/no_destructor_test.cc b/util/no_destructor_test.cc
index b41caca..edafb08 100644
--- a/util/no_destructor_test.cc
+++ b/util/no_destructor_test.cc
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
+#include "util/no_destructor.h"
+
#include <cstdint>
#include <cstdlib>
#include <utility>
-#include "util/no_destructor.h"
-#include "util/testharness.h"
+#include "third_party/googletest/googletest/include/gtest/gtest.h"
namespace leveldb {
@@ -28,8 +29,6 @@ constexpr const uint64_t kGoldenB = 0xaabbccddeeffaabb;
} // namespace
-class NoDestructorTest {};
-
TEST(NoDestructorTest, StackInstance) {
NoDestructor<DoNotDestruct> instance(kGoldenA, kGoldenB);
ASSERT_EQ(kGoldenA, instance.get()->a);
@@ -44,4 +43,7 @@ TEST(NoDestructorTest, StaticInstance) {
} // namespace leveldb
-int main(int argc, char** argv) { return leveldb::test::RunAllTests(); }
+int main(int argc, char** argv) {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}