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:
authorSimon Cropp <simon.cropp@gmail.com>2020-01-31 20:18:23 +0300
committerGitHub <noreply@github.com>2020-01-31 20:18:23 +0300
commit933575cbd7c9e306439cefcd171785e9f7280c55 (patch)
treee4ecb029cee05a9a5cd25b25d718b2aade1bf153 /Test/Mono.Cecil.Tests
parent0a2f2944638c13987d8a2318bc34bd64fdac55fd (diff)
Fix locally scoped constant array (#644)
* add failing test for LocallyScopedConstantArray * add LocallyScopedConstantArray target assembly * ElementType.Array should be treated the same as object in ReadLocalConstant * assert constant is null * Style fixes Co-authored-by: Jb Evain <jb@evain.net>
Diffstat (limited to 'Test/Mono.Cecil.Tests')
-rw-r--r--Test/Mono.Cecil.Tests/ImageReadTests.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Test/Mono.Cecil.Tests/ImageReadTests.cs b/Test/Mono.Cecil.Tests/ImageReadTests.cs
index fa5562e..de7a2cc 100644
--- a/Test/Mono.Cecil.Tests/ImageReadTests.cs
+++ b/Test/Mono.Cecil.Tests/ImageReadTests.cs
@@ -208,6 +208,20 @@ namespace Mono.Cecil.Tests {
}
[Test]
+ public void LocallyScopedConstantArray ()
+ {
+ TestModule ("LocallyScopedConstantArray.dll", module => {
+ Assert.IsTrue (module.HasDebugHeader);
+ var method = module.Types
+ .Single (x => x.Name == "TestClass")
+ .Methods
+ .Single (x => x.Name == "TestMethod");
+ var debugInformation = method.DebugInformation;
+ Assert.IsNull (debugInformation.Scope.Constants.Single ().Value);
+ }, symbolReaderProvider: typeof (PortablePdbReaderProvider), symbolWriterProvider: typeof (PortablePdbWriterProvider));
+ }
+
+ [Test]
public void ExternalPdbDeterministicAssembly ()
{
TestModule ("ExternalPdbDeterministic.dll", module => {