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:
Diffstat (limited to 'Test/Mono.Cecil.Tests')
-rw-r--r--Test/Mono.Cecil.Tests/PortablePdbTests.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Test/Mono.Cecil.Tests/PortablePdbTests.cs b/Test/Mono.Cecil.Tests/PortablePdbTests.cs
index 3aa0ffc..a89f79d 100644
--- a/Test/Mono.Cecil.Tests/PortablePdbTests.cs
+++ b/Test/Mono.Cecil.Tests/PortablePdbTests.cs
@@ -454,6 +454,23 @@ namespace Mono.Cecil.Tests {
}
[Test]
+ public void NullGenericInstConstant ()
+ {
+ TestModule ("NullConst.dll", module => {
+ var type = module.GetType ("NullConst.Program");
+ var method = type.GetMethod ("MakeConst");
+ var symbol = method.DebugInformation;
+
+ Assert.IsNotNull (symbol);
+ Assert.AreEqual (1, symbol.Scope.Constants.Count);
+
+ var a = symbol.Scope.Constants [0];
+ Assert.AreEqual ("thing", a.Name);
+ Assert.AreEqual (null, a.Value);
+ }, verify: false, symbolReaderProvider: typeof (PortablePdbReaderProvider), symbolWriterProvider: typeof (PortablePdbWriterProvider));
+ }
+
+ [Test]
public void InvalidConstantRecord ()
{
using (var module = GetResourceModule ("mylib.dll", new ReaderParameters { SymbolReaderProvider = new PortablePdbReaderProvider () })) {