Browse Source

Fix build fail 1

pull/1984/head
Siegfried Pammer 5 years ago
parent
commit
2efe36c381
  1. 2
      ILSpy.Tests/Analyzers/MethodUsesAnalyzerTests.cs
  2. 2
      ILSpy.Tests/Analyzers/TypeUsedByAnalyzerTests.cs
  3. 14
      ILSpy.Tests/Stub.cs

2
ILSpy.Tests/Analyzers/MethodUsesAnalyzerTests.cs

@ -23,7 +23,7 @@ namespace ICSharpCode.ILSpy.Tests.Analyzers
[OneTimeSetUp] [OneTimeSetUp]
public void Setup() public void Setup()
{ {
new Application(); Stub.SetupApplication();
Options.DecompilerSettingsPanel.TestSetup(new Decompiler.DecompilerSettings()); Options.DecompilerSettingsPanel.TestSetup(new Decompiler.DecompilerSettings());
assemblyList = new AssemblyList("Test"); assemblyList = new AssemblyList("Test");
testAssembly = assemblyList.OpenAssembly(typeof(MethodUsesAnalyzerTests).Assembly.Location); testAssembly = assemblyList.OpenAssembly(typeof(MethodUsesAnalyzerTests).Assembly.Location);

2
ILSpy.Tests/Analyzers/TypeUsedByAnalyzerTests.cs

@ -41,7 +41,7 @@ namespace ICSharpCode.ILSpy.Tests.Analyzers
[OneTimeSetUp] [OneTimeSetUp]
public void Setup() public void Setup()
{ {
new Application(); Stub.SetupApplication();
Options.DecompilerSettingsPanel.TestSetup(new Decompiler.DecompilerSettings()); Options.DecompilerSettingsPanel.TestSetup(new Decompiler.DecompilerSettings());
assemblyList = new AssemblyList("Test"); assemblyList = new AssemblyList("Test");
testAssembly = assemblyList.OpenAssembly(typeof(MethodUsesAnalyzerTests).Assembly.Location); testAssembly = assemblyList.OpenAssembly(typeof(MethodUsesAnalyzerTests).Assembly.Location);

14
ILSpy.Tests/Stub.cs

@ -16,12 +16,24 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
using System.Windows;
namespace ICSharpCode.ILSpy.Tests namespace ICSharpCode.ILSpy.Tests
{ {
class Stub public static class Stub
{ {
static void Main(string[] args) static void Main(string[] args)
{ {
} }
static readonly object sync = new object();
internal static void SetupApplication()
{
lock (sync) {
if (Application.Current == null)
new Application();
}
}
} }
} }

Loading…
Cancel
Save