director string testing additions

Add test for C# based on Java example to test strings in and out.
Memory cleanup for Java test.
This commit is contained in:
William S Fulton 2022-02-12 12:09:01 +00:00
commit 86eaf30735
2 changed files with 77 additions and 12 deletions

View file

@ -16,22 +16,29 @@ public class director_default_runme {
{
director_default_MyFoo a = new director_default_MyFoo();
a = new director_default_MyFoo(10);
a.delete();
}
director_default_MyFoo a = new director_default_MyFoo();
if (!a.GetMsg().equals("director_default_MyFoo-default")) {
throw new RuntimeException ( "Test 1 failed" );
}
if (!a.GetMsg("boo").equals("director_default_MyFoo-boo")) {
throw new RuntimeException ( "Test 2 failed" );
{
director_default_MyFoo a = new director_default_MyFoo();
if (!a.GetMsg().equals("director_default_MyFoo-default")) {
throw new RuntimeException ( "Test 1 failed" );
}
if (!a.GetMsg("boo").equals("director_default_MyFoo-boo")) {
throw new RuntimeException ( "Test 2 failed" );
}
a.delete();
}
Foo b = new Foo();
if (!b.GetMsg().equals("Foo-default")) {
throw new RuntimeException ( "Test 1 failed" );
}
if (!b.GetMsg("boo").equals("Foo-boo")) {
throw new RuntimeException ( "Test 2 failed" );
{
Foo b = new Foo();
if (!b.GetMsg().equals("Foo-default")) {
throw new RuntimeException ( "Test 1 failed" );
}
if (!b.GetMsg("boo").equals("Foo-boo")) {
throw new RuntimeException ( "Test 2 failed" );
}
b.delete();
}
}