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:
authorSteve Gilham <SteveGilham@users.noreply.github.com>2022-09-30 00:59:52 +0300
committerGitHub <noreply@github.com>2022-09-30 00:59:52 +0300
commite052ab52e44fd2a6564964e47e79929068731916 (patch)
tree66f464d7b2538a0d050c7a5cc4eaff21cc240958 /Test/Mono.Cecil.Tests
parent92f32da3b9516b2610612cd73dfd965f141c5f64 (diff)
Address issue #873 (#874)
* Address issue #873 * Be explicit as to what we support writing * Use normal test infrastructure * Restore writing primitives * Restore style * Can't verify .net core assembly Co-authored-by: Jb Evain <jb@evain.net>
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 () })) {