1 //===-- SupportTest.cpp -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "lldb/Host/linux/Support.h"
11 #include "llvm/Support/Threading.h"
12 #include "gtest/gtest.h"
14 using namespace lldb_private;
16 TEST(Support, getProcFile_Pid) {
17 auto BufferOrError = getProcFile(getpid(), "maps");
18 ASSERT_TRUE(BufferOrError);
19 ASSERT_TRUE(*BufferOrError);
22 TEST(Support, getProcFile_Tid) {
23 auto BufferOrError = getProcFile(getpid(), llvm::get_threadid(), "comm");
24 ASSERT_TRUE(BufferOrError);
25 ASSERT_TRUE(*BufferOrError);