summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2009-07-02 21:59:29 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2009-07-02 21:59:29 +0000
commit1adaae5780b5e3c264870f2977808f129d9ec605 (patch)
tree23ad7bb9e5e31441cc76816356cdd202d4412aaa
parent134610e55dadf3f9b4789e39caea4d61f9b6ddde (diff)
downloadswig-1adaae5780b5e3c264870f2977808f129d9ec605.tar.gz
rename custom testcases with a custom_ prefix (intermediary_classname.i and lib_arrays.i). Also some typo fixes for custom testcases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11348 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Examples/test-suite/common.mk7
-rw-r--r--Examples/test-suite/csharp/Makefile.in10
-rw-r--r--Examples/test-suite/csharp/custom_csharp_lib_arrays_runme.cs (renamed from Examples/test-suite/csharp/csharp_lib_arrays_runme.cs)10
-rw-r--r--Examples/test-suite/csharp/custom_intermediary_classname_runme.cs (renamed from Examples/test-suite/csharp/intermediary_classname_runme.cs)10
-rw-r--r--Examples/test-suite/custom_csharp_lib_arrays.i (renamed from Examples/test-suite/csharp_lib_arrays.i)2
-rw-r--r--Examples/test-suite/custom_intermediary_classname.i (renamed from Examples/test-suite/intermediary_classname.i)2
-rw-r--r--Examples/test-suite/java/Makefile.in2
-rw-r--r--Examples/test-suite/java/custom_intermediary_classname_runme.java (renamed from Examples/test-suite/java/intermediary_classname_runme.java)12
8 files changed, 28 insertions, 27 deletions
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index 9b54765ef..744ffc1c3 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -9,7 +9,8 @@
# then builds the object code for use by the language.
# To complete a test in a language follow these guidelines:
# 1) Add testcases to CPP_TEST_CASES (c++) or C_TEST_CASES (c) or
-# MULTI_CPP_TEST_CASES (multi-module c++ tests)
+# MULTI_CPP_TEST_CASES (multi-module c++ tests) or
+# CUSTOM_TEST_CASES (mainly for customised SWIG comandline options)
# 2) If not already done, create a makefile which:
# a) Defines LANGUAGE matching a language rule in Examples/Makefile,
# for example LANGUAGE = java
@@ -471,8 +472,8 @@ MULTI_CPP_TEST_CASES += \
# Non standard testcases, usually using custom commandline options
# Testcase names are prefixed with custom_ and can be run individually using make testcase.customtest
-CUSTOM_TEST_CASES = \
- custom_allkw \
+CUSTOM_TEST_CASES += \
+ custom_wallkw \
# individual custom tests - any kind of customisation allowed here
# Note: $(basename $@) strips everything after and including the . in the target name
diff --git a/Examples/test-suite/csharp/Makefile.in b/Examples/test-suite/csharp/Makefile.in
index df5f1a7fd..0c5ff5520 100644
--- a/Examples/test-suite/csharp/Makefile.in
+++ b/Examples/test-suite/csharp/Makefile.in
@@ -22,8 +22,8 @@ CPP_TEST_CASES = \
exception_partial_info
CUSTOM_TEST_CASES = \
- csharp_lib_arrays \
- intermediary_classname
+ custom_csharp_lib_arrays \
+ custom_intermediary_classname
include $(srcdir)/../common.mk
@@ -50,9 +50,9 @@ CSHARPFLAGSSPECIAL =
+$(run_testcase)
# Rules for custom tests
-intermediary_classname.customtest:
- $(MAKE) $(basename $@).cpptest SWIGOPTCUSTOM="-dllimport intermediary_classname"
-csharp_lib_arrays.customtest:
+custom_intermediary_classname.customtest:
+ $(MAKE) $(basename $@).cpptest SWIGOPTCUSTOM="-dllimport custom_intermediary_classname"
+custom_csharp_lib_arrays.customtest:
$(MAKE) $(basename $@).cpptest CSHARPFLAGSSPECIAL="-unsafe"
# Makes a directory for the testcase if it does not exist
diff --git a/Examples/test-suite/csharp/csharp_lib_arrays_runme.cs b/Examples/test-suite/csharp/custom_csharp_lib_arrays_runme.cs
index 9f3ea6b88..aa0cd0ede 100644
--- a/Examples/test-suite/csharp/csharp_lib_arrays_runme.cs
+++ b/Examples/test-suite/csharp/custom_csharp_lib_arrays_runme.cs
@@ -1,5 +1,5 @@
using System;
-using csharp_lib_arraysNamespace;
+using custom_csharp_lib_arraysNamespace;
public class runme
{
@@ -9,7 +9,7 @@ public class runme
int[] source = { 1, 2, 3, 4, 5 };
int[] target = new int[ source.Length ];
- csharp_lib_arrays.myArrayCopy( source, target, target.Length );
+ custom_csharp_lib_arrays.myArrayCopy( source, target, target.Length );
CompareArrays(source, target);
}
@@ -17,7 +17,7 @@ public class runme
int[] source = { 1, 2, 3, 4, 5 };
int[] target = new int[ source.Length ];
- csharp_lib_arrays.myArrayCopyUsingFixedArrays( source, target, target.Length );
+ custom_csharp_lib_arrays.myArrayCopyUsingFixedArrays( source, target, target.Length );
CompareArrays(source, target);
}
@@ -25,7 +25,7 @@ public class runme
int[] source = { 1, 2, 3, 4, 5 };
int[] target = new int[] { 6, 7, 8, 9, 10 };
- csharp_lib_arrays.myArraySwap( source, target, target.Length );
+ custom_csharp_lib_arrays.myArraySwap( source, target, target.Length );
for (int i=0; i<target.Length; ++i)
target[i] += 5;
@@ -36,7 +36,7 @@ public class runme
int[] source = { 1, 2, 3, 4, 5 };
int[] target = new int[] { 6, 7, 8, 9, 10 };
- csharp_lib_arrays.myArraySwapUsingFixedArrays( source, target, target.Length );
+ custom_csharp_lib_arrays.myArraySwapUsingFixedArrays( source, target, target.Length );
for (int i=0; i<target.Length; ++i)
target[i] += 5;
diff --git a/Examples/test-suite/csharp/intermediary_classname_runme.cs b/Examples/test-suite/csharp/custom_intermediary_classname_runme.cs
index 0ae8fba75..365a6954e 100644
--- a/Examples/test-suite/csharp/intermediary_classname_runme.cs
+++ b/Examples/test-suite/csharp/custom_intermediary_classname_runme.cs
@@ -1,21 +1,21 @@
/***********************************************************************************************
- NOTE: This is a custom testcase and should be run using make intermediary_classname.customtest
+ NOTE: This is a custom testcase and should be run using make custom_intermediary_classname.customtest
***********************************************************************************************/
using System;
-using intermediary_classnameNamespace;
+using custom_intermediary_classnameNamespace;
public class runme
{
static void Main()
{
// test the renamed module class is correctly named
- double d = intermediary_classnameModule.maxdouble(10.0, 20.0);
+ double d = custom_intermediary_classnameModule.maxdouble(10.0, 20.0);
if (d!=20.0) throw new Exception("Test failed");
// test the renamed intermediary class is correctly named
- IntPtr ptr = intermediary_classname.new_vecdouble(10);
- intermediary_classname.delete_vecdouble(new System.Runtime.InteropServices.HandleRef(null,ptr));
+ IntPtr ptr = custom_intermediary_classname.new_vecdouble(10);
+ custom_intermediary_classname.delete_vecdouble(new System.Runtime.InteropServices.HandleRef(null,ptr));
}
}
diff --git a/Examples/test-suite/csharp_lib_arrays.i b/Examples/test-suite/custom_csharp_lib_arrays.i
index d07d43737..05688db20 100644
--- a/Examples/test-suite/csharp_lib_arrays.i
+++ b/Examples/test-suite/custom_csharp_lib_arrays.i
@@ -1,4 +1,4 @@
-%module csharp_lib_arrays
+%module custom_csharp_lib_arrays
%include "arrays_csharp.i"
diff --git a/Examples/test-suite/intermediary_classname.i b/Examples/test-suite/custom_intermediary_classname.i
index 94858a5fb..6d51785ef 100644
--- a/Examples/test-suite/intermediary_classname.i
+++ b/Examples/test-suite/custom_intermediary_classname.i
@@ -1,6 +1,6 @@
// This test is to check the intermediary class name can be changed (C# and Java only use intermediary classes at time of writing)
-%module(directors="1", jniclassname="intermediary_classname", imclassname="intermediary_classname") "intermediary_classname"
+%module(directors="1", jniclassname="custom_intermediary_classname", imclassname="custom_intermediary_classname") "custom_intermediary_classname"
%warnfilter(SWIGWARN_TYPEMAP_THREAD_UNSAFE,SWIGWARN_TYPEMAP_DIRECTOROUT_PTR);
diff --git a/Examples/test-suite/java/Makefile.in b/Examples/test-suite/java/Makefile.in
index 03c10d498..5a838d97c 100644
--- a/Examples/test-suite/java/Makefile.in
+++ b/Examples/test-suite/java/Makefile.in
@@ -19,7 +19,7 @@ CPP_TEST_CASES = \
enum_thorough_simple \
enum_thorough_typeunsafe \
exception_partial_info \
- intermediary_classname \
+ custom_intermediary_classname \
java_constants \
java_director \
java_enums \
diff --git a/Examples/test-suite/java/intermediary_classname_runme.java b/Examples/test-suite/java/custom_intermediary_classname_runme.java
index 03efc030c..1f3933b4a 100644
--- a/Examples/test-suite/java/intermediary_classname_runme.java
+++ b/Examples/test-suite/java/custom_intermediary_classname_runme.java
@@ -1,10 +1,10 @@
-import intermediary_classname.*;
+import custom_intermediary_classname.*;
-public class intermediary_classname_runme {
+public class custom_intermediary_classname_runme {
static {
try {
- System.loadLibrary("intermediary_classname");
+ System.loadLibrary("custom_intermediary_classname");
} 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);
@@ -14,11 +14,11 @@ public class intermediary_classname_runme {
public static void main(String argv[])
{
// test the renamed module class is correctly named
- double d = intermediary_classnameModule.maxdouble(10.0, 20.0);
+ double d = custom_intermediary_classnameModule.maxdouble(10.0, 20.0);
if (d!=20.0) throw new RuntimeException("Test failed");
// test the renamed intermediary class is correctly named
- long ptr = intermediary_classname.new_vecdouble(10);
- intermediary_classname.delete_vecdouble(ptr);
+ long ptr = custom_intermediary_classname.new_vecdouble(10);
+ custom_intermediary_classname.delete_vecdouble(ptr);
}
}