diff --git a/Examples/test-suite/csharp/director_default_runme.cs b/Examples/test-suite/csharp/director_default_runme.cs new file mode 100644 index 000000000..af14c1eb4 --- /dev/null +++ b/Examples/test-suite/csharp/director_default_runme.cs @@ -0,0 +1,58 @@ +using System; + +namespace director_defaultNamespace { + +public class runme +{ + static void Main() + { + { + MyFoo a = new MyFoo(); + a = new MyFoo(10); + a.Dispose(); + } + + { + MyFoo a = new MyFoo(); + if (a.GetMsg() != "MyFoo-default") { + throw new Exception( "Test 1 failed" ); + } + if (a.GetMsg("boo") != "MyFoo-boo") { + throw new Exception( "Test 2 failed" ); + } + a.Dispose(); + } + + { + Foo b = new Foo(); + if (b.GetMsg() != "Foo-default") { + throw new Exception( "Test 1 failed" ); + } + if (b.GetMsg("boo") != "Foo-boo") { + throw new Exception( "Test 2 failed" ); + } + b.Dispose(); + } + } +} + +public class MyFoo : Foo +{ + public MyFoo() + : base() + { + } + + public MyFoo(int i) + : base(i) + { + } + + public override string Msg(string msg) + { + return "MyFoo-" + msg; + } +} + +} + diff --git a/Examples/test-suite/java/director_default_runme.java b/Examples/test-suite/java/director_default_runme.java index b71e45e25..1ab13237a 100644 --- a/Examples/test-suite/java/director_default_runme.java +++ b/Examples/test-suite/java/director_default_runme.java @@ -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(); } }