summaryrefslogtreecommitdiff
path: root/Examples/test-suite/csharp/director_protected_runme.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/csharp/director_protected_runme.cs')
-rw-r--r--Examples/test-suite/csharp/director_protected_runme.cs28
1 files changed, 28 insertions, 0 deletions
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();";
+ }
+}
+
}