sort out c++0x lambda tests and reorder cpp0x tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12182 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
25ff4e4927
commit
996455b50e
3 changed files with 82 additions and 36 deletions
28
Examples/test-suite/java/cpp0x_lambda_functions_runme.java
Normal file
28
Examples/test-suite/java/cpp0x_lambda_functions_runme.java
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import cpp0x_lambda_functions.*;
|
||||
|
||||
public class cpp0x_lambda_functions_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("cpp0x_lambda_functions");
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
||||
private static void check(int received, int expected) {
|
||||
if (expected != received)
|
||||
throw new RuntimeException("check failed, expected: " + expected + " received: " + received);
|
||||
}
|
||||
|
||||
public static void main(String argv[])
|
||||
{
|
||||
check(cpp0x_lambda_functions.runLambda1(), 11);
|
||||
check(cpp0x_lambda_functions.runLambda2(), 11);
|
||||
check(cpp0x_lambda_functions.runLambda3(), 11);
|
||||
check(cpp0x_lambda_functions.runLambda4(), 11);
|
||||
check(cpp0x_lambda_functions.runLambda5(), 1);
|
||||
check(cpp0x_lambda_functions.runLambda5(), 2);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue