director_property testcase for C# and Java
Testing std::string as director method parameter
This commit is contained in:
parent
f32a20fc2f
commit
88f1389f80
2 changed files with 105 additions and 0 deletions
51
Examples/test-suite/csharp/director_property_runme.cs
Normal file
51
Examples/test-suite/csharp/director_property_runme.cs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
|
||||
namespace director_propertyNamespace {
|
||||
|
||||
public class runme
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
{
|
||||
Foo a = new MyFoo();
|
||||
if (a.getA() != "") {
|
||||
throw new Exception( "Test failed" );
|
||||
}
|
||||
a.setA("Hello");
|
||||
if (a.getA() != "Hello set from MyFoo") {
|
||||
throw new Exception( "Test failed" );
|
||||
}
|
||||
a.Dispose();
|
||||
}
|
||||
|
||||
{
|
||||
Foo a_original = new MyFoo();
|
||||
Foo a = Foo.get_self(a_original);
|
||||
if (a.getA() != "") {
|
||||
throw new Exception( "Test failed" );
|
||||
}
|
||||
a.setA("Hello");
|
||||
if (a.getA() != "Hello set from MyFoo") {
|
||||
throw new Exception( "Test failed" );
|
||||
}
|
||||
a.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MyFoo : Foo
|
||||
{
|
||||
public MyFoo()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public override void setA(string a)
|
||||
{
|
||||
base.setA(a + " set from MyFoo");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue