Browse Source

CLI.Gen.cs: fix omitted typemap from previous commit

pull/1802/head
Deadlocklogic 2 years ago
parent
commit
473ecf9ed3
  1. 18
      tests/dotnet/CLI/CLI.Gen.cs

18
tests/dotnet/CLI/CLI.Gen.cs

@ -1,7 +1,6 @@
using CppSharp.AST; using CppSharp.AST;
using CppSharp.Generators; using CppSharp.Generators;
using CppSharp.Generators.C; using CppSharp.Generators.C;
using CppSharp.Passes;
using CppSharp.Types; using CppSharp.Types;
using CppSharp.Utils; using CppSharp.Utils;
@ -21,6 +20,8 @@ namespace CppSharp.Tests
} }
} }
namespace CLI
{
[TypeMap("TestMappedTypeNonConstRefParam", GeneratorKindID = GeneratorKind.CLI_ID)] [TypeMap("TestMappedTypeNonConstRefParam", GeneratorKindID = GeneratorKind.CLI_ID)]
public class TestMappedTypeNonConstRefParamTypeMap : TypeMap public class TestMappedTypeNonConstRefParamTypeMap : TypeMap
{ {
@ -49,6 +50,21 @@ namespace CppSharp.Tests
ctx.Return.Write("_{0}", ctx.ArgName); ctx.Return.Write("_{0}", ctx.ArgName);
} }
} }
}
namespace Cpp
{
[TypeMap("TestMappedTypeNonConstRefParam", GeneratorKindID = GeneratorKind.CPlusPlus_ID)]
public class TestMappedTypeNonConstRefParamTypeMap : TypeMap
{
public override Type SignatureType(TypePrinterContext ctx, GeneratorKind kind)
{
var tagType = ctx.Type as TagType;
var typePrinter = new CppTypePrinter(Context);
return new CustomType(tagType.Declaration.Visit(typePrinter));
}
}
}
public class CLITestsGenerator : GeneratorTest public class CLITestsGenerator : GeneratorTest
{ {

Loading…
Cancel
Save