diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2020-05-23 20:37:33 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2020-05-23 20:37:33 +0000 |
commit | bc64b5ce191d48b503e4fad8c0cefb774a2fa969 (patch) | |
tree | 9b41925d7159f1f57c1b59a1a5f887c80a57e999 /contrib/pzstd/utils/test/ScopeGuardTest.cpp | |
parent | ea68403922c3b53b00fc999fcb3eaef1feb50177 (diff) |
Notes
Diffstat (limited to 'contrib/pzstd/utils/test/ScopeGuardTest.cpp')
-rw-r--r-- | contrib/pzstd/utils/test/ScopeGuardTest.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/contrib/pzstd/utils/test/ScopeGuardTest.cpp b/contrib/pzstd/utils/test/ScopeGuardTest.cpp deleted file mode 100644 index 7bc624da79b2c..0000000000000 --- a/contrib/pzstd/utils/test/ScopeGuardTest.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2016-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under both the BSD-style license (found in the - * LICENSE file in the root directory of this source tree) and the GPLv2 (found - * in the COPYING file in the root directory of this source tree). - */ -#include "utils/ScopeGuard.h" - -#include <gtest/gtest.h> - -using namespace pzstd; - -TEST(ScopeGuard, Dismiss) { - { - auto guard = makeScopeGuard([&] { EXPECT_TRUE(false); }); - guard.dismiss(); - } -} - -TEST(ScopeGuard, Executes) { - bool executed = false; - { - auto guard = makeScopeGuard([&] { executed = true; }); - } - EXPECT_TRUE(executed); -} |