java_director_exception_feature_nspace test case changes
- The implementation for SEP for the classpath is not portable, eg the
separator should be ':' not ';' on Cygwin, but clearly it could be ';'
if using a native Windows version of Java. In the past the test-suite
has been constructed to avoid this problem and these changes go back to
this approach at the expense of not testing nspace without -package (but
not specifying -package is quite unusual when using nspace, so no great
loss). This test could be restored to how it was if the separator is
detected at configure time from the JVM itself, eg by calling Java code:
System.out.println(System.getProperty("path.separator"));
- Mangle the non-public classes in the _runme.java file so that they are
unique to this testcase (the .class files generated can interfere with
other tests).
- Const corrections and spelling mistakes fixed in test case.
test case improvements
This commit is contained in:
parent
e717ed3056
commit
baec61c5ab
4 changed files with 46 additions and 52 deletions
|
|
@ -138,26 +138,26 @@
|
|||
%feature("director") Foo;
|
||||
|
||||
// Rename exceptions on java side to make translation of exceptions more clear
|
||||
%rename(MyJavaException1,fullname=1) MyNS::Exception1;
|
||||
%rename(MyJavaException2,fullname=1) MyNS::Exception2;
|
||||
%rename(MyJavaUnexpected,fullname=1) MyNS::Unexpected;
|
||||
%rename(MyJavaException1) MyNS::Exception1;
|
||||
%rename(MyJavaException2) MyNS::Exception2;
|
||||
%rename(MyJavaUnexpected) MyNS::Unexpected;
|
||||
|
||||
%typemap(javabase) ::MyNS::Exception1,::MyNS::Exception2,::MyNS::Unexpected "java.lang.Exception";
|
||||
%rename(getMessage) what(); // Rename all what() methods
|
||||
%rename(getMessage) what() const; // Rename all what() methods
|
||||
|
||||
namespace MyNS {
|
||||
|
||||
struct Exception1 {
|
||||
Exception1(const std::string& what);
|
||||
const char * what();
|
||||
const char * what() const;
|
||||
};
|
||||
struct Exception2 {
|
||||
Exception2(const std::string& what);
|
||||
const char * what();
|
||||
const char * what() const;
|
||||
};
|
||||
struct Unexpected {
|
||||
Unexpected(const std::string& what);
|
||||
const char * what();
|
||||
const char * what() const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue