aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/DebugInfo
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/DebugInfo')
-rw-r--r--llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp2
-rw-r--r--llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp2
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp2
-rw-r--r--llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp1
-rw-r--r--llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp14
5 files changed, 15 insertions, 6 deletions
diff --git a/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp b/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
index 5c96199..fab40b9 100644
--- a/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
+++ b/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
@@ -84,7 +84,7 @@ public:
class RandomAccessVisitorTest : public testing::Test {
public:
- RandomAccessVisitorTest() {}
+ RandomAccessVisitorTest() = default;
static void SetUpTestCase() {
GlobalState = std::make_unique<GlobalTestState>();
diff --git a/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp b/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
index b1f19e9..62b7591 100644
--- a/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
+++ b/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
@@ -21,7 +21,7 @@ using namespace llvm::codeview;
class TypeIndexIteratorTest : public testing::Test {
public:
- TypeIndexIteratorTest() {}
+ TypeIndexIteratorTest() = default;
void SetUp() override {
Refs.clear();
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
index 2fe5260..aa5b292 100644
--- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
@@ -864,7 +864,7 @@ TEST_F(DebugLineBasicFixture, CallbackUsedForUnterminatedSequence) {
}
struct AdjustAddressFixtureBase : public CommonFixture {
- virtual ~AdjustAddressFixtureBase() {}
+ virtual ~AdjustAddressFixtureBase() = default;
// Create and update the prologue as specified by the subclass, then return
// the length of the table.
diff --git a/llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp b/llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp
index 27ff449c..e4dc77b 100644
--- a/llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp
+++ b/llvm/unittests/DebugInfo/LogicalView/StringPoolTest.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/DebugInfo/LogicalView/Core/LVStringPool.h"
-#include <vector>
#include "gtest/gtest.h"
diff --git a/llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp b/llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp
index b010b5fc..20ae253 100644
--- a/llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp
+++ b/llvm/unittests/DebugInfo/PDB/NativeSessionTest.cpp
@@ -19,8 +19,6 @@
#include "gtest/gtest.h"
-#include <vector>
-
using namespace llvm;
using namespace llvm::pdb;
@@ -42,6 +40,18 @@ TEST(NativeSessionTest, TestCreateFromExe) {
ASSERT_THAT_ERROR(std::move(E), Succeeded());
}
+TEST(NativeSessionTest, TestInvalidPdbMagicError) {
+ SmallString<128> InputsDir = unittest::getInputFileDirectory(TestMainArgv0);
+ llvm::sys::path::append(InputsDir, "SimpleTest.cpp");
+ std::string CppPath{InputsDir};
+ std::unique_ptr<IPDBSession> S;
+
+ Error E = NativeSession::createFromPdbPath(CppPath, S);
+ const char *FormatErr = "The record is in an unexpected format. "
+ "The input file did not contain the pdb file magic.";
+ ASSERT_THAT_ERROR(std::move(E), FailedWithMessage(FormatErr));
+}
+
TEST(NativeSessionTest, TestSetLoadAddress) {
std::unique_ptr<IPDBSession> S;
Error E = pdb::loadDataForEXE(PDB_ReaderType::Native, getExePath(), S);