Apply C# test updates for directors with std::wstring supplied by wsfulton

This commit is contained in:
tartanpaint 2020-01-29 09:00:59 +00:00 • committed by William S Fulton
commit 9fd59650cf
3 changed files with 48 additions and 0 deletions

View file

@ -25,6 +25,7 @@ CPP_TEST_CASES = \
csharp_namespace_system_collision \
csharp_prepost \
csharp_typemaps \
director_wstring \
enum_thorough_simple \
enum_thorough_typesafe \
exception_partial_info \

View file

@ -0,0 +1,41 @@
using System;
using director_wstringNamespace;
public class runme
{
static void Main()
{
runme r = new runme();
r.run();
}
void run()
{
director_wstring_B b = new director_wstring_B("hello");
b.get(0);
if (b.get_first() != "hello world!")
throw new ApplicationException("Incorrect get_first:" + b.get_first());
b.call_process_func();
if (b.smem != "hello")
throw new ApplicationException("Incorrect smem:" + b.smem);
}
}
class director_wstring_B : A
{
public String smem;
public director_wstring_B(String first) : base(first)
{
}
public override String get_first()
{
return base.get_first() + " world!";
}
public override void process_text(String s)
{
this.smem = s;
}
}