Apply C# test updates for directors with std::wstring supplied by wsfulton
This commit is contained in:
parent
3377b63dad
commit
9fd59650cf
3 changed files with 48 additions and 0 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
41
Examples/test-suite/csharp/director_wstring_runme.cs
Normal file
41
Examples/test-suite/csharp/director_wstring_runme.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue