Browse Source

Removed a test project which actually contained no tests at all.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/767/head
Dimitar Dobrev 9 years ago
parent
commit
f45c8c8ddf
  1. 57
      tests/TypeMaps/QList.cs
  2. 0
      tests/TypeMaps/TypeMaps.Tests.cs
  3. 11
      tests/TypeMaps/TypeMaps.cpp
  4. 34
      tests/TypeMaps/TypeMaps.cs
  5. 16
      tests/TypeMaps/TypeMaps.h
  6. 2
      tests/TypeMaps/premake4.lua

57
tests/TypeMaps/QList.cs

@ -1,57 +0,0 @@ @@ -1,57 +0,0 @@
using CppSharp.AST.Extensions;
using CppSharp.Generators;
using CppSharp.Generators.CLI;
using CppSharp.Generators.CSharp;
using CppSharp.Types;
namespace TypeMaps.Gen
{
[TypeMap("QList")]
public class QList : TypeMap
{
public override bool DoesMarshalling
{
get { return false; }
}
public override string CLISignature(CLITypePrinterContext ctx)
{
return "TypeMaps::QList^";
}
public override void CLIMarshalToManaged(MarshalContext ctx)
{
}
public override void CLIMarshalToNative(MarshalContext ctx)
{
}
public override string CSharpSignature(CSharpTypePrinterContext ctx)
{
if (ctx.CSharpKind == CSharpTypePrinterContextKind.Native)
{
if (Type.IsAddress())
{
return "QList.Internal*";
}
return "QList.Internal";
}
return "QList";
}
public override void CSharpMarshalToManaged(MarshalContext ctx)
{
}
public override void CSharpMarshalToNative(MarshalContext ctx)
{
}
public override void CSharpMarshalCopyCtorToManaged(MarshalContext ctx)
{
ctx.SupportBefore.WriteLine("var __instance = new {0}.Internal();", ctx.ReturnType);
ctx.SupportBefore.WriteLine("__instance.i = {0}.i;", ctx.ReturnVarName);
}
}
}

0
tests/TypeMaps/TypeMaps.Tests.cs

11
tests/TypeMaps/TypeMaps.cpp

@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
#include "TypeMaps.h"
#include <string.h>
QList::QList() : i(5)
{
}
QList HasQList::getList()
{
return list;
}

34
tests/TypeMaps/TypeMaps.cs

@ -1,34 +0,0 @@ @@ -1,34 +0,0 @@
using System.Linq;
using CppSharp.AST;
using CppSharp.Generators;
using CppSharp.Utils;
namespace CppSharp.Tests
{
public class TypeMaps : GeneratorTest
{
public TypeMaps(GeneratorKind kind)
: base("TypeMaps", kind)
{
}
public override void SetupPasses(Driver driver)
{
driver.Options.MarshalCharAsManagedChar = true;
}
public override void Preprocess(Driver driver, ASTContext ctx)
{
ctx.SetClassAsValueType("HasQList");
ctx.FindCompleteClass("QList").Constructors.First(c => c.IsCopyConstructor).GenerationKind = GenerationKind.None;
ctx.IgnoreClassWithName("IgnoredType");
}
public static void Main(string[] args)
{
ConsoleDriver.Run(new TypeMaps(GeneratorKind.CLI));
ConsoleDriver.Run(new TypeMaps(GeneratorKind.CSharp));
}
}
}

16
tests/TypeMaps/TypeMaps.h

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
#include "../Tests.h"
class DLL_API QList
{
public:
QList();
int i;
};
class DLL_API HasQList
{
public:
QList getList();
private:
QList list;
};

2
tests/TypeMaps/premake4.lua

@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
group "Tests/TypeMaps"
SetupTestProject("TypeMaps")
Loading…
Cancel
Save