Browse Source

Extracted Mono detection logic to Platform.

pull/499/head
triton 10 years ago
parent
commit
49ba3146a5
  1. 6
      src/Core/Platform.cs
  2. 3
      src/Generator.Tests/GeneratorTest.cs

6
src/Core/Platform.cs

@ -47,4 +47,10 @@ namespace CppSharp @@ -47,4 +47,10 @@ namespace CppSharp
return false;
}
}
public static bool IsMono
{
get { return System.Type.GetType("Mono.Runtime") == null; }
}
}
}

3
src/Generator.Tests/GeneratorTest.cs

@ -2,7 +2,6 @@ @@ -2,7 +2,6 @@
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Runtime.InteropServices;
using CppSharp.AST;
using CppSharp.Generators;
using NUnit.Framework;
@ -40,7 +39,7 @@ namespace CppSharp.Utils @@ -40,7 +39,7 @@ namespace CppSharp.Utils
// Workaround for CLR which does not check for .dll if the
// name already has a dot.
if (System.Type.GetType("Mono.Runtime") == null)
if (Platform.IsMono)
options.SharedLibraryName += ".dll";
var path = Path.GetFullPath(GetTestsDirectory(name));

Loading…
Cancel
Save