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
path: root/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Test')
-rw-r--r--Test/Mono.Cecil.Tests/PortablePdbTests.cs17
-rw-r--r--Test/Resources/assemblies/empty-str-const.exebin0 -> 4096 bytes
-rw-r--r--Test/Resources/assemblies/empty-str-const.pdbbin0 -> 2668 bytes
3 files changed, 17 insertions, 0 deletions
diff --git a/Test/Mono.Cecil.Tests/PortablePdbTests.cs b/Test/Mono.Cecil.Tests/PortablePdbTests.cs
index 43b8cfe..d9786cb 100644
--- a/Test/Mono.Cecil.Tests/PortablePdbTests.cs
+++ b/Test/Mono.Cecil.Tests/PortablePdbTests.cs
@@ -475,6 +475,23 @@ namespace Mono.Cecil.Tests {
}
[Test]
+ public void EmptyStringLocalConstant ()
+ {
+ TestModule ("empty-str-const.exe", module => {
+ var type = module.GetType ("<Program>$");
+ var method = type.GetMethod ("<Main>$");
+ var symbol = method.DebugInformation;
+
+ Assert.IsNotNull (symbol);
+ Assert.AreEqual (1, symbol.Scope.Constants.Count);
+
+ var a = symbol.Scope.Constants [0];
+ Assert.AreEqual ("value", a.Name);
+ Assert.AreEqual ("", a.Value);
+ }, symbolReaderProvider: typeof (PortablePdbReaderProvider), symbolWriterProvider: typeof (PortablePdbWriterProvider));
+ }
+
+ [Test]
public void SourceLink ()
{
TestModule ("TargetLib.dll", module => {
diff --git a/Test/Resources/assemblies/empty-str-const.exe b/Test/Resources/assemblies/empty-str-const.exe
new file mode 100644
index 0000000..6cc5128
--- /dev/null
+++ b/Test/Resources/assemblies/empty-str-const.exe
Binary files differ
diff --git a/Test/Resources/assemblies/empty-str-const.pdb b/Test/Resources/assemblies/empty-str-const.pdb
new file mode 100644
index 0000000..723ec4e
--- /dev/null
+++ b/Test/Resources/assemblies/empty-str-const.pdb
Binary files differ