Tools and libraries to glue C/C++ APIs to high-level languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
997 B

using CppSharp.AST;
using CppSharp.Generators;
using CppSharp.Utils;
namespace CppSharp.Tests
{
public class Basic : GeneratorTest
{
public Basic(GeneratorKind kind)
: base("Basic", kind)
{
}
public override void SetupPasses(Driver driver)
{
if (driver.Options.IsCSharpGenerator)
driver.Options.GenerateAbstractImpls = true;
}
public override void Preprocess(Driver driver, ASTContext ctx)
{
ctx.SetClassAsValueType("Bar");
ctx.SetClassAsValueType("Bar2");
ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOut", 1, ParameterUsage.Out);
ctx.SetMethodParameterUsage("Hello", "TestPrimitiveOutRef", 1, ParameterUsage.Out);
}
public static void Main(string[] args)
{
ConsoleDriver.Run(new Basic(GeneratorKind.CLI));
ConsoleDriver.Run(new Basic(GeneratorKind.CSharp));
}
}
}