[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / lldb / unittests / Host / linux / SupportTest.cpp
blob6d1d28cd4caad52f0e95694d0c7aadc4f735ac6b
1 //===-- SupportTest.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 //===----------------------------------------------------------------------===//
9 #include "lldb/Host/linux/Support.h"
10 #include "llvm/Support/Threading.h"
11 #include "gtest/gtest.h"
13 using namespace lldb_private;
15 TEST(Support, getProcFile_Pid) {
16 auto BufferOrError = getProcFile(getpid(), "maps");
17 ASSERT_TRUE(BufferOrError);
18 ASSERT_TRUE(*BufferOrError);
21 #ifdef LLVM_ENABLE_THREADING
22 TEST(Support, getProcFile_Tid) {
23 auto BufferOrError = getProcFile(getpid(), llvm::get_threadid(), "comm");
24 ASSERT_TRUE(BufferOrError);
25 ASSERT_TRUE(*BufferOrError);
27 #endif /*ifdef LLVM_ENABLE_THREADING */