diff options
Diffstat (limited to 'Examples/test-suite/csharp')
-rw-r--r-- | Examples/test-suite/csharp/director_alternating_runme.cs | 11 | ||||
-rw-r--r-- | Examples/test-suite/csharp/director_protected_runme.cs | 28 |
2 files changed, 39 insertions, 0 deletions
diff --git a/Examples/test-suite/csharp/director_alternating_runme.cs b/Examples/test-suite/csharp/director_alternating_runme.cs new file mode 100644 index 000000000..19365217a --- /dev/null +++ b/Examples/test-suite/csharp/director_alternating_runme.cs @@ -0,0 +1,11 @@ + +using System; +using director_alternatingNamespace; + +public class director_alternating_runme { + public static void Main() { + if (director_alternating.getBar().id() != director_alternating.idFromGetBar()) + throw new Exception("idFromGetBar failed"); + } +} + diff --git a/Examples/test-suite/csharp/director_protected_runme.cs b/Examples/test-suite/csharp/director_protected_runme.cs index ee4697b0e..b44c3b7e9 100644 --- a/Examples/test-suite/csharp/director_protected_runme.cs +++ b/Examples/test-suite/csharp/director_protected_runme.cs @@ -16,6 +16,7 @@ public class runme Foo f = b.create(); FooBar fb = new FooBar(); FooBar2 fb2 = new FooBar2(); + FooBar3 fb3 = new FooBar3(); String s; s = fb.used(); @@ -37,6 +38,21 @@ public class runme s = fb.pong(); if ( s != ("Bar::pong();Foo::pong();FooBar::ping();")) throw new Exception("bad FooBar::pong"); + +// if (fb3.cheer() != "FooBar3::cheer();") +// throw new Exception("bad fb3::cheer"); + + if (fb2.callping() != "FooBar2::ping();") + throw new Exception("bad fb2.callping"); + + if (fb2.callcheer() != "FooBar2::pang();Bar::pong();Foo::pong();FooBar2::ping();") + throw new Exception("bad fb2.callcheer"); + + if (fb3.callping() != "Bar::ping();") + throw new Exception("bad fb3.callping"); + + if (fb3.callcheer() != "FooBar3::cheer();") + throw new Exception("bad fb3.callcheer"); } } @@ -69,4 +85,16 @@ class FooBar2 : Bar } } +class FooBar3 : Bar +{ + public FooBar3() : base() + { + } + + protected override String cheer() + { + return "FooBar3::cheer();"; + } +} + } |