Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJb Evain <jb@evain.net>2018-03-03 02:26:22 +0300
committerJb Evain <jb@evain.net>2018-03-03 02:26:22 +0300
commit7ef3adf97aa62f5e566b5cad8287602998a3e0f2 (patch)
treed569289d76362673bb3bc6bb8afaad2c770fab58 /Test/Mono.Cecil.Tests
parent3d1ab7dfcd41c0a524bb0fd4ff87dd921c558ed1 (diff)
Add tests for ppdb symbol mismatch
Diffstat (limited to 'Test/Mono.Cecil.Tests')
-rw-r--r--Test/Mono.Cecil.Tests/SymbolTests.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/Mono.Cecil.Tests/SymbolTests.cs b/Test/Mono.Cecil.Tests/SymbolTests.cs
index 69cbb99..4d952a2 100644
--- a/Test/Mono.Cecil.Tests/SymbolTests.cs
+++ b/Test/Mono.Cecil.Tests/SymbolTests.cs
@@ -65,6 +65,21 @@ namespace Mono.Cecil.Tests {
Assert.IsFalse (module.HasSymbols);
}
}
+
+ [Test]
+ public void PortablePdbMismatch ()
+ {
+ Assert.Throws<SymbolNotMatchingException> (() => GetResourceModule ("pdb-mismatch.dll", new ReaderParameters { SymbolReaderProvider = new PortablePdbReaderProvider () }));
+ }
+
+ [Test]
+ public void PortablePdbIgnoreMismatch()
+ {
+ using (var module = GetResourceModule ("pdb-mismatch.dll", new ReaderParameters { SymbolReaderProvider = new PortablePdbReaderProvider (), ThrowIfSymbolsAreNotMatching = false })) {
+ Assert.IsNull (module.SymbolReader);
+ Assert.IsFalse (module.HasSymbols);
+ }
+ }
}
}
#endif \ No newline at end of file