10
10
#include " gtest/gtest.h"
11
11
12
12
#include " llvm/ADT/STLExtras.h"
13
- #include " llvm/Config/config.h"
14
13
#include " llvm/DebugInfo/PDB/PDBSymbolData.h"
15
14
#include " llvm/DebugInfo/PDB/PDBSymbolExe.h"
16
15
#include " llvm/Support/FileSystem.h"
@@ -63,10 +62,8 @@ class SymbolFilePDBTests : public testing::Test {
63
62
llvm::sys::path::append (inputs_folder, " Inputs" );
64
63
65
64
m_pdb_test_exe = inputs_folder;
66
- m_dwarf_test_exe = inputs_folder;
67
65
m_types_test_exe = inputs_folder;
68
66
llvm::sys::path::append (m_pdb_test_exe, " test-pdb.exe" );
69
- llvm::sys::path::append (m_dwarf_test_exe, " test-dwarf.exe" );
70
67
llvm::sys::path::append (m_types_test_exe, " test-pdb-types.exe" );
71
68
}
72
69
@@ -84,7 +81,6 @@ class SymbolFilePDBTests : public testing::Test {
84
81
85
82
protected:
86
83
llvm::SmallString<128 > m_pdb_test_exe;
87
- llvm::SmallString<128 > m_dwarf_test_exe;
88
84
llvm::SmallString<128 > m_types_test_exe;
89
85
90
86
bool FileSpecMatchesAsBaseOrFull (const FileSpec &left,
@@ -154,29 +150,7 @@ class SymbolFilePDBTests : public testing::Test {
154
150
}
155
151
};
156
152
157
- #if HAVE_DIA_SDK
158
- #define REQUIRES_DIA_SDK (TestName ) TestName
159
- #else
160
- #define REQUIRES_DIA_SDK (TestName ) DISABLED_##TestName
161
- #endif
162
-
163
- TEST_F (SymbolFilePDBTests, TestAbilitiesForDWARF) {
164
- // Test that when we have Dwarf debug info, SymbolFileDWARF is used.
165
- FileSpec fspec (m_dwarf_test_exe.c_str (), false );
166
- ArchSpec aspec (" i686-pc-windows" );
167
- lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
168
-
169
- SymbolVendor *plugin = module ->GetSymbolVendor ();
170
- EXPECT_NE (nullptr , plugin);
171
- SymbolFile *symfile = plugin->GetSymbolFile ();
172
- EXPECT_NE (nullptr , symfile);
173
- EXPECT_EQ (symfile->GetPluginName (), SymbolFileDWARF::GetPluginNameStatic ());
174
-
175
- uint32_t expected_abilities = SymbolFile::kAllAbilities ;
176
- EXPECT_EQ (expected_abilities, symfile->CalculateAbilities ());
177
- }
178
-
179
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK(TestAbilitiesForPDB)) {
153
+ TEST_F (SymbolFilePDBTests, TestAbilitiesForPDB) {
180
154
// Test that when we have PDB debug info, SymbolFilePDB is used.
181
155
FileSpec fspec (m_pdb_test_exe.c_str (), false );
182
156
ArchSpec aspec (" i686-pc-windows" );
@@ -193,7 +167,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestAbilitiesForPDB)) {
193
167
EXPECT_EQ (expected_abilities, symfile->CalculateAbilities ());
194
168
}
195
169
196
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestResolveSymbolContextBasename) ) {
170
+ TEST_F (SymbolFilePDBTests, TestResolveSymbolContextBasename) {
197
171
// Test that attempting to call ResolveSymbolContext with only a basename
198
172
// finds all full paths
199
173
// with the same basename
@@ -213,7 +187,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestResolveSymbolContextBasename)) {
213
187
EXPECT_TRUE (ContainsCompileUnit (sc_list, header_spec));
214
188
}
215
189
216
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestResolveSymbolContextFullPath) ) {
190
+ TEST_F (SymbolFilePDBTests, TestResolveSymbolContextFullPath) {
217
191
// Test that attempting to call ResolveSymbolContext with a full path only
218
192
// finds the one source
219
193
// file that matches the full path.
@@ -236,7 +210,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestResolveSymbolContextFullPath)) {
236
210
}
237
211
238
212
TEST_F (SymbolFilePDBTests,
239
- REQUIRES_DIA_SDK ( TestLookupOfHeaderFileWithInlines) ) {
213
+ TestLookupOfHeaderFileWithInlines) {
240
214
// Test that when looking up a header file via ResolveSymbolContext (i.e. a
241
215
// file that was not by itself
242
216
// compiled, but only contributes to the combined code of other source files),
@@ -264,8 +238,7 @@ TEST_F(SymbolFilePDBTests,
264
238
}
265
239
}
266
240
267
- TEST_F (SymbolFilePDBTests,
268
- REQUIRES_DIA_SDK (TestLookupOfHeaderFileWithNoInlines)) {
241
+ TEST_F (SymbolFilePDBTests, TestLookupOfHeaderFileWithNoInlines) {
269
242
// Test that when looking up a header file via ResolveSymbolContext (i.e. a
270
243
// file that was not by itself
271
244
// compiled, but only contributes to the combined code of other source files),
@@ -289,7 +262,7 @@ TEST_F(SymbolFilePDBTests,
289
262
}
290
263
}
291
264
292
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestLineTablesMatchAll) ) {
265
+ TEST_F (SymbolFilePDBTests, TestLineTablesMatchAll) {
293
266
// Test that when calling ResolveSymbolContext with a line number of 0, all
294
267
// line entries from
295
268
// the specified files are returned.
@@ -338,7 +311,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestLineTablesMatchAll)) {
338
311
VerifyLineEntry (module , sc, header2, *lt, 7 , 0x401089 );
339
312
}
340
313
341
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestLineTablesMatchSpecific) ) {
314
+ TEST_F (SymbolFilePDBTests, TestLineTablesMatchSpecific) {
342
315
// Test that when calling ResolveSymbolContext with a specific line number,
343
316
// only line entries
344
317
// which match the requested line are returned.
@@ -390,7 +363,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestLineTablesMatchSpecific)) {
390
363
VerifyLineEntry (module , sc, header1, *lt, 9 , 0x401090 );
391
364
}
392
365
393
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestSimpleClassTypes) ) {
366
+ TEST_F (SymbolFilePDBTests, TestSimpleClassTypes) {
394
367
FileSpec fspec (m_types_test_exe.c_str (), false );
395
368
ArchSpec aspec (" i686-pc-windows" );
396
369
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
@@ -413,7 +386,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestSimpleClassTypes)) {
413
386
udt_type->GetByteSize ());
414
387
}
415
388
416
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestNestedClassTypes) ) {
389
+ TEST_F (SymbolFilePDBTests, TestNestedClassTypes) {
417
390
FileSpec fspec (m_types_test_exe.c_str (), false );
418
391
ArchSpec aspec (" i686-pc-windows" );
419
392
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
@@ -436,7 +409,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestNestedClassTypes)) {
436
409
udt_type->GetByteSize ());
437
410
}
438
411
439
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestClassInNamespace) ) {
412
+ TEST_F (SymbolFilePDBTests, TestClassInNamespace) {
440
413
FileSpec fspec (m_types_test_exe.c_str (), false );
441
414
ArchSpec aspec (" i686-pc-windows" );
442
415
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
@@ -459,7 +432,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestClassInNamespace)) {
459
432
udt_type->GetByteSize ());
460
433
}
461
434
462
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestEnumTypes) ) {
435
+ TEST_F (SymbolFilePDBTests, TestEnumTypes) {
463
436
FileSpec fspec (m_types_test_exe.c_str (), false );
464
437
ArchSpec aspec (" i686-pc-windows" );
465
438
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
@@ -492,21 +465,21 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestEnumTypes)) {
492
465
}
493
466
}
494
467
495
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestArrayTypes) ) {
468
+ TEST_F (SymbolFilePDBTests, TestArrayTypes) {
496
469
// In order to get this test working, we need to support lookup by symbol
497
470
// name. Because array
498
471
// types themselves do not have names, only the symbols have names (i.e. the
499
472
// name of the array).
500
473
}
501
474
502
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestFunctionTypes) ) {
475
+ TEST_F (SymbolFilePDBTests, TestFunctionTypes) {
503
476
// In order to get this test working, we need to support lookup by symbol
504
477
// name. Because array
505
478
// types themselves do not have names, only the symbols have names (i.e. the
506
479
// name of the array).
507
480
}
508
481
509
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestTypedefs) ) {
482
+ TEST_F (SymbolFilePDBTests, TestTypedefs) {
510
483
FileSpec fspec (m_types_test_exe.c_str (), false );
511
484
ArchSpec aspec (" i686-pc-windows" );
512
485
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
@@ -540,7 +513,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestTypedefs)) {
540
513
}
541
514
}
542
515
543
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestRegexNameMatch) ) {
516
+ TEST_F (SymbolFilePDBTests, TestRegexNameMatch) {
544
517
FileSpec fspec (m_types_test_exe.c_str (), false );
545
518
ArchSpec aspec (" i686-pc-windows" );
546
519
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
@@ -557,7 +530,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestRegexNameMatch)) {
557
530
EXPECT_EQ (num_results, results.GetSize ());
558
531
}
559
532
560
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestMaxMatches) ) {
533
+ TEST_F (SymbolFilePDBTests, TestMaxMatches) {
561
534
FileSpec fspec (m_types_test_exe.c_str (), false );
562
535
ArchSpec aspec (" i686-pc-windows" );
563
536
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
@@ -584,7 +557,7 @@ TEST_F(SymbolFilePDBTests, REQUIRES_DIA_SDK(TestMaxMatches)) {
584
557
}
585
558
}
586
559
587
- TEST_F (SymbolFilePDBTests, REQUIRES_DIA_SDK( TestNullName) ) {
560
+ TEST_F (SymbolFilePDBTests, TestNullName) {
588
561
FileSpec fspec (m_types_test_exe.c_str (), false );
589
562
ArchSpec aspec (" i686-pc-windows" );
590
563
lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
0 commit comments