/tags/rel-1-3-29/SWIG/Examples/test-suite/java/default_constructor_runme.java
Java | 32 lines | 26 code | 4 blank | 2 comment | 0 complexity | a3f504086a818c2be18df5f1a6052a9e MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- import default_constructor.*;
- public class default_constructor_runme {
- static {
- try {
- System.loadLibrary("default_constructor");
- } catch (UnsatisfiedLinkError e) {
- System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
- System.exit(1);
- }
- }
- public static void main(String argv[])
- {
- // calling protected destructor test
- try {
- G g = new G();
- g.delete();
- throw new RuntimeException("Protected destructor exception should have been thrown");
- } catch (UnsupportedOperationException e) {
- }
- // calling private destructor test
- try {
- FFF f = new FFF();
- f.delete();
- throw new RuntimeException("Private destructor exception should have been thrown");
- } catch (UnsupportedOperationException e) {
- }
- }
- }