reverse merge last commit - 11348

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11349 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-07-02 22:40:49 +00:00
commit 9fe205d0f1
8 changed files with 27 additions and 28 deletions

View file

@ -22,8 +22,8 @@ CPP_TEST_CASES = \
exception_partial_info
CUSTOM_TEST_CASES = \
custom_csharp_lib_arrays \
custom_intermediary_classname
csharp_lib_arrays \
intermediary_classname
include $(srcdir)/../common.mk
@ -50,9 +50,9 @@ CSHARPFLAGSSPECIAL =
+$(run_testcase)
# Rules for custom tests
custom_intermediary_classname.customtest:
$(MAKE) $(basename $@).cpptest SWIGOPTCUSTOM="-dllimport custom_intermediary_classname"
custom_csharp_lib_arrays.customtest:
intermediary_classname.customtest:
$(MAKE) $(basename $@).cpptest SWIGOPTCUSTOM="-dllimport intermediary_classname"
csharp_lib_arrays.customtest:
$(MAKE) $(basename $@).cpptest CSHARPFLAGSSPECIAL="-unsafe"
# Makes a directory for the testcase if it does not exist

View file

@ -1,5 +1,5 @@
using System;
using custom_csharp_lib_arraysNamespace;
using 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 ];
custom_csharp_lib_arrays.myArrayCopy( source, target, target.Length );
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 ];
custom_csharp_lib_arrays.myArrayCopyUsingFixedArrays( source, target, target.Length );
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 };
custom_csharp_lib_arrays.myArraySwap( source, target, target.Length );
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 };
custom_csharp_lib_arrays.myArraySwapUsingFixedArrays( source, target, target.Length );
csharp_lib_arrays.myArraySwapUsingFixedArrays( source, target, target.Length );
for (int i=0; i<target.Length; ++i)
target[i] += 5;

View file

@ -1,21 +1,21 @@
/***********************************************************************************************
NOTE: This is a custom testcase and should be run using make custom_intermediary_classname.customtest
NOTE: This is a custom testcase and should be run using make intermediary_classname.customtest
***********************************************************************************************/
using System;
using custom_intermediary_classnameNamespace;
using intermediary_classnameNamespace;
public class runme
{
static void Main()
{
// test the renamed module class is correctly named
double d = custom_intermediary_classnameModule.maxdouble(10.0, 20.0);
double d = 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 = custom_intermediary_classname.new_vecdouble(10);
custom_intermediary_classname.delete_vecdouble(new System.Runtime.InteropServices.HandleRef(null,ptr));
IntPtr ptr = intermediary_classname.new_vecdouble(10);
intermediary_classname.delete_vecdouble(new System.Runtime.InteropServices.HandleRef(null,ptr));
}
}