1//===-- ContinueTest.cpp --------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "DAP.h"
10#include "Handler/RequestHandler.h"
11#include "Protocol/ProtocolRequests.h"
12#include "TestBase.h"
13#include "llvm/Testing/Support/Error.h"
14#include "gtest/gtest.h"
15
16using namespace llvm;
17using namespace lldb;
18using namespace lldb_dap;
19using namespace lldb_dap_tests;
20using namespace lldb_dap::protocol;
21
22class ContinueRequestHandlerTest : public DAPTestBase {};
23
24TEST_F(ContinueRequestHandlerTest, NotStopped) {
25 SBTarget target;
26 dap->debugger.SetSelectedTarget(target);
27
28 ContinueRequestHandler handler(*dap);
29
30 ContinueArguments args_all_threads;
31 args_all_threads.singleThread = false;
32 args_all_threads.threadId = 0;
33
34 auto result_all_threads = handler.Run(args: args_all_threads);
35 EXPECT_THAT_EXPECTED(result_all_threads,
36 llvm::FailedWithMessage("not stopped"));
37
38 ContinueArguments args_single_thread;
39 args_single_thread.singleThread = true;
40 args_single_thread.threadId = 1234;
41
42 auto result_single_thread = handler.Run(args: args_single_thread);
43 EXPECT_THAT_EXPECTED(result_single_thread,
44 llvm::FailedWithMessage("not stopped"));
45}
46

source code of lldb/unittests/DAP/Handler/ContinueTest.cpp