blob: d3073310e3e7427065673414a91a18ed7b7b5580 [file] [log] [blame]
Bruce Mitchenereb284e42015-10-06 10:17:34 +00001//===-- SymbolsTest.cpp -----------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Pavel Labath46031e62016-09-07 08:46:50 +000010#include "gtest/gtest.h"
11
Bruce Mitchenereb284e42015-10-06 10:17:34 +000012#include "lldb/Host/Symbols.h"
13#include "lldb/Core/ModuleSpec.h"
14
15using namespace lldb_private;
16
Kate Stoneb9c1b512016-09-06 20:57:50 +000017TEST(SymbolsTest,
18 LocateExecutableSymbolFileForUnknownExecutableAndUnknownSymbolFile) {
19 ModuleSpec module_spec;
20 FileSpec symbol_file_spec = Symbols::LocateExecutableSymbolFile(module_spec);
21 EXPECT_TRUE(symbol_file_spec.GetFilename().IsEmpty());
Bruce Mitchenereb284e42015-10-06 10:17:34 +000022}
23
Kate Stoneb9c1b512016-09-06 20:57:50 +000024TEST(SymbolsTest,
25 LocateExecutableSymbolFileForUnknownExecutableAndMissingSymbolFile) {
26 ModuleSpec module_spec;
27 // using a GUID here because the symbol file shouldn't actually exist on disk
28 module_spec.GetSymbolFileSpec().SetFile(
29 "4A524676-B24B-4F4E-968A-551D465EBAF1.so", false);
30 FileSpec symbol_file_spec = Symbols::LocateExecutableSymbolFile(module_spec);
31 EXPECT_TRUE(symbol_file_spec.GetFilename().IsEmpty());
Bruce Mitchenereb284e42015-10-06 10:17:34 +000032}