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>2019-02-12 10:00:55 +0300
committerJb Evain <jb@evain.net>2019-02-12 10:00:55 +0300
commit529bd983dc300d5a5f163452a4f56dd4c5fb0412 (patch)
tree0a87f061951ca8065c8b63a3000bd037873953de /Test/Mono.Cecil.Tests
parent2eaa73661006c3cc51daa31688e8d7ccfc4562ba (diff)
Run symbols tests in ReadOnly mode as well
Diffstat (limited to 'Test/Mono.Cecil.Tests')
-rw-r--r--Test/Mono.Cecil.Tests/ImageReadTests.cs2
-rw-r--r--Test/Mono.Cecil.Tests/PortablePdbTests.cs4
-rw-r--r--Test/Mono.Cecil.Tests/SymbolTests.cs12
3 files changed, 11 insertions, 7 deletions
diff --git a/Test/Mono.Cecil.Tests/ImageReadTests.cs b/Test/Mono.Cecil.Tests/ImageReadTests.cs
index 13c8474..fa5562e 100644
--- a/Test/Mono.Cecil.Tests/ImageReadTests.cs
+++ b/Test/Mono.Cecil.Tests/ImageReadTests.cs
@@ -207,7 +207,6 @@ namespace Mono.Cecil.Tests {
});
}
-#if !READ_ONLY
[Test]
public void ExternalPdbDeterministicAssembly ()
{
@@ -236,6 +235,5 @@ namespace Mono.Cecil.Tests {
Assert.IsTrue (header.Entries.Any (e => e.Directory.Type == ImageDebugType.EmbeddedPortablePdb));
}, symbolReaderProvider: typeof (EmbeddedPortablePdbReaderProvider), symbolWriterProvider: typeof (EmbeddedPortablePdbWriterProvider));
}
-#endif
}
}
diff --git a/Test/Mono.Cecil.Tests/PortablePdbTests.cs b/Test/Mono.Cecil.Tests/PortablePdbTests.cs
index 34d998a..1a44273 100644
--- a/Test/Mono.Cecil.Tests/PortablePdbTests.cs
+++ b/Test/Mono.Cecil.Tests/PortablePdbTests.cs
@@ -1,4 +1,3 @@
-#if !READ_ONLY
using System;
using System.IO;
using System.Linq;
@@ -554,6 +553,7 @@ class Program
}, symbolReaderProvider: typeof (PortablePdbReaderProvider), symbolWriterProvider: typeof (PortablePdbWriterProvider));
}
+#if !READ_ONLY
public sealed class SymbolWriterProvider : ISymbolWriterProvider {
readonly DefaultSymbolWriterProvider writer_provider = new DefaultSymbolWriterProvider ();
@@ -670,6 +670,6 @@ class Program
Assert.AreEqual (Path.GetFileName (debug_header_pdb_path), pdb_path);
}
}
+#endif
}
}
-#endif \ No newline at end of file
diff --git a/Test/Mono.Cecil.Tests/SymbolTests.cs b/Test/Mono.Cecil.Tests/SymbolTests.cs
index c8889a1..7955292 100644
--- a/Test/Mono.Cecil.Tests/SymbolTests.cs
+++ b/Test/Mono.Cecil.Tests/SymbolTests.cs
@@ -1,4 +1,3 @@
-#if !READ_ONLY
using System;
using System.IO;
@@ -10,6 +9,15 @@ using Mono.Cecil.Pdb;
namespace Mono.Cecil.Tests {
+#if READ_ONLY
+ // Stubs to avoid ifdefing out the symbolWriterProvider arguments for all the tests that are using them
+ public class DefaultSymbolWriterProvider {}
+ public class PdbWriterProvider {}
+ public class MdbWriterProvider {}
+ public class PortablePdbWriterProvider {}
+ public class EmbeddedPortablePdbWriterProvider {}
+#endif
+
[TestFixture]
public class SymbolTests : BaseTestFixture {
@@ -131,5 +139,3 @@ namespace Mono.Cecil.Tests {
}
}
}
-
-#endif