mirror of https://github.com/mono/CppSharp.git
7 changed files with 65 additions and 3 deletions
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
using NUnit.Framework; |
||||
using UTF16; |
||||
|
||||
[TestFixture] |
||||
public class UTF16Tests |
||||
{ |
||||
[Test] |
||||
public void TestFoo() |
||||
{ |
||||
var foo = new Foo(); |
||||
const string georgia = "საქართველო"; |
||||
foo.Unicode = georgia; |
||||
Assert.That(foo.Unicode, Is.EqualTo(georgia)); |
||||
} |
||||
} |
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
using System.Text; |
||||
using CppSharp.AST; |
||||
using CppSharp.Generators; |
||||
using CppSharp.Utils; |
||||
|
||||
namespace CppSharp.Tests |
||||
{ |
||||
public class UTF16Tests : LibraryTest |
||||
{ |
||||
public UTF16Tests(LanguageGeneratorKind kind) |
||||
: base("UTF16", kind) |
||||
{ |
||||
} |
||||
|
||||
public override void SetupPasses(Driver driver) |
||||
{ |
||||
driver.Options.Encoding = Encoding.Unicode; |
||||
} |
||||
|
||||
public override void Preprocess(Driver driver, Library lib) |
||||
{ |
||||
|
||||
} |
||||
|
||||
static class Program |
||||
{ |
||||
public static void Main(string[] args) |
||||
{ |
||||
ConsoleDriver.Run(new UTF16Tests(LanguageGeneratorKind.CSharp)); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
#if defined(_MSC_VER) |
||||
#define DLL_API __declspec(dllexport) |
||||
#else |
||||
#define DLL_API |
||||
#endif |
||||
|
||||
class DLL_API Foo |
||||
{ |
||||
public: |
||||
const char* Unicode; |
||||
}; |
||||
|
||||
DLL_API int FooCallFoo(Foo* foo); |
Loading…
Reference in new issue