llvm/lldb/unittests/Host/MainLoopTest.cpp

//===-- MainLoopTest.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "lldb/Host/MainLoop.h"
#include "TestingSupport/SubsystemRAII.h"
#include "lldb/Host/ConnectionFileDescriptor.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/PseudoTerminal.h"
#include "lldb/Host/common/TCPSocket.h"
#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
#include <future>
#include <thread>

usingnamespacelldb_private;

namespace {
class MainLoopTest : public testing::Test {};
} // namespace

TEST_F(MainLoopTest, ReadObject) {}

TEST_F(MainLoopTest, NoSpuriousReads) {}

TEST_F(MainLoopTest, TerminatesImmediately) {}

TEST_F(MainLoopTest, PendingCallback) {}

TEST_F(MainLoopTest, PendingCallbackCalledOnlyOnce) {}

TEST_F(MainLoopTest, PendingCallbackTrigger) {}

// Regression test for assertion failure if a lot of callbacks end up
// being queued after loop exits.
TEST_F(MainLoopTest, PendingCallbackAfterLoopExited) {}

#ifdef LLVM_ON_UNIX
TEST_F(MainLoopTest, DetectsEOF) {}

TEST_F(MainLoopTest, Signal) {}

// Test that a signal which is not monitored by the MainLoop does not
// cause a premature exit.
TEST_F(MainLoopTest, UnmonitoredSignal) {}

// Test that two callbacks can be registered for the same signal
// and unregistered independently.
TEST_F(MainLoopTest, TwoSignalCallbacks) {}
#endif