mirror of https://github.com/mono/CppSharp.git
5 changed files with 47 additions and 50 deletions
@ -1,41 +0,0 @@
@@ -1,41 +0,0 @@
|
||||
using System; |
||||
using CppSharp.AST; |
||||
using CppSharp.Generators; |
||||
using CppSharp.Passes; |
||||
using CppSharp.Utils; |
||||
|
||||
namespace CppSharp.Tests |
||||
{ |
||||
|
||||
public class NamespacesBaseTests : GeneratorTest |
||||
{ |
||||
public NamespacesBaseTests(GeneratorKind kind) |
||||
: base("NamespacesBase", kind) |
||||
{ |
||||
} |
||||
|
||||
public override void SetupPasses(Driver driver) |
||||
{ |
||||
driver.Options.GeneratePropertiesAdvanced = true; |
||||
} |
||||
|
||||
public override void Preprocess(Driver driver, ASTContext ctx) |
||||
{ |
||||
} |
||||
|
||||
public override void Postprocess(Driver driver, ASTContext ctx) |
||||
{ |
||||
new CaseRenamePass( |
||||
RenameTargets.Function | RenameTargets.Method | RenameTargets.Property | RenameTargets.Delegate | RenameTargets.Variable, |
||||
RenameCasePattern.UpperCamelCase).VisitLibrary(driver.ASTContext); |
||||
} |
||||
|
||||
} |
||||
public class NamespacesBase { |
||||
|
||||
public static void Main(string[] args) |
||||
{ |
||||
ConsoleDriver.Run(new NamespacesBaseTests(GeneratorKind.CSharp)); |
||||
} |
||||
} |
||||
} |
@ -1,2 +1,27 @@
@@ -1,2 +1,27 @@
|
||||
function SetupWrapper(name) |
||||
project(name .. ".CSharp") |
||||
SetupManagedTestProject() |
||||
|
||||
dependson { name .. ".Native", "NamespacesDerived.Gen" } |
||||
local runtimeExe = os.is("windows") and "" or "mono --debug " |
||||
if string.starts(action, "vs") then |
||||
local exePath = SafePath("$(TargetDir)NamespacesDerived.Gen.exe") |
||||
prebuildcommands { runtimeExe .. exePath } |
||||
else |
||||
local exePath = SafePath("%{cfg.buildtarget.directory}/NamespacesDerived.Gen.exe") |
||||
prebuildcommands { runtimeExe .. exePath } |
||||
end |
||||
|
||||
files |
||||
{ |
||||
path.join(gendir, "NamespacesDerived", name .. ".cs"), |
||||
} |
||||
|
||||
linktable = { "CppSharp.Runtime" } |
||||
|
||||
links(linktable) |
||||
end |
||||
|
||||
group "Tests/Namespaces" |
||||
SetupTestCSharp("NamespacesBase") |
||||
SetupTestNativeProject("NamespacesBase") |
||||
SetupWrapper("NamespacesBase") |
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
||||
group "Tests/Namespaces" |
||||
SetupTestGeneratorProject("NamespacesDerived", "NamespacesBase") |
||||
SetupTestNativeProject("NamespacesDerived", "NamespacesBase") |
||||
SetupTestProjectsCSharp("NamespacesDerived", "NamespacesBase") |
||||
SetupTestGeneratorProject("NamespacesDerived") |
||||
SetupTestNativeProject("NamespacesDerived", "NamespacesBase") |
||||
SetupTestProjectsCSharp("NamespacesDerived", "NamespacesBase") |
||||
|
||||
project("NamespacesDerived.Tests.CSharp") |
||||
links { "NamespacesBase.CSharp" } |
Loading…
Reference in new issue