summaryrefslogtreecommitdiff
path: root/unittests/Host/PredicateTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Host/PredicateTest.cpp')
-rw-r--r--unittests/Host/PredicateTest.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/unittests/Host/PredicateTest.cpp b/unittests/Host/PredicateTest.cpp
deleted file mode 100644
index 88ee6b6fc106..000000000000
--- a/unittests/Host/PredicateTest.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- PredicateTest.cpp ---------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Host/Predicate.h"
-#include "gtest/gtest.h"
-#include <thread>
-
-using namespace lldb_private;
-
-TEST(Predicate, WaitForValueEqualTo) {
- Predicate<int> P(0);
- EXPECT_TRUE(P.WaitForValueEqualTo(0));
- EXPECT_FALSE(P.WaitForValueEqualTo(1, std::chrono::milliseconds(10)));
-
- std::thread Setter([&P] {
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
- P.SetValue(1, eBroadcastAlways);
- });
- EXPECT_TRUE(P.WaitForValueEqualTo(1));
- Setter.join();
-}
-
-TEST(Predicate, WaitForValueNotEqualTo) {
- Predicate<int> P(0);
- EXPECT_EQ(0, P.WaitForValueNotEqualTo(1));
- EXPECT_EQ(llvm::None,
- P.WaitForValueNotEqualTo(0, std::chrono::milliseconds(10)));
-}