protected and private destructor test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5d4984f150
commit
f23a4c2ef7
1 changed files with 23 additions and 0 deletions
23
SWIG/Examples/test-suite/csharp/default_constructor_runme.cs
Normal file
23
SWIG/Examples/test-suite/csharp/default_constructor_runme.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
|
||||
public class runme
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
// calling protected destructor test
|
||||
try {
|
||||
using (G g = new G()) {
|
||||
}
|
||||
throw new Exception("Protected destructor exception should have been thrown");
|
||||
} catch (MethodAccessException e) {
|
||||
}
|
||||
|
||||
// calling private destructor test
|
||||
try {
|
||||
using (FFF f = new FFF()) {
|
||||
}
|
||||
throw new Exception("Private destructor exception should have been thrown");
|
||||
} catch (MethodAccessException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue