Merge from trunk
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12270 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
commit
1842244c93
530 changed files with 22854 additions and 11740 deletions
|
|
@ -8,8 +8,8 @@ INTERPRETER = @CSHARPCILINTERPRETER@
|
|||
CSHARPPATHSEPARATOR = "@CSHARPPATHSEPARATOR@"
|
||||
CSHARPCYGPATH_W = @CSHARPCYGPATH_W@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_builddir = @top_builddir@/..
|
||||
top_srcdir = ../@top_srcdir@
|
||||
top_builddir = ../@top_builddir@
|
||||
|
||||
CPP_TEST_CASES = \
|
||||
csharp_attributes \
|
||||
|
|
@ -27,7 +27,6 @@ include $(srcdir)/../common.mk
|
|||
|
||||
# Overridden variables here
|
||||
SWIGOPT += -namespace $*Namespace
|
||||
INTERFACEDIR = ../../
|
||||
|
||||
CSHARPFLAGSSPECIAL =
|
||||
|
||||
|
|
|
|||
20
Examples/test-suite/csharp/li_boost_shared_ptr_bits_runme.cs
Normal file
20
Examples/test-suite/csharp/li_boost_shared_ptr_bits_runme.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using li_boost_shared_ptr_bitsNamespace;
|
||||
|
||||
public class runme
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
VectorIntHolder v = new VectorIntHolder();
|
||||
v.Add(new IntHolder(11));
|
||||
v.Add(new IntHolder(22));
|
||||
v.Add(new IntHolder(33));
|
||||
|
||||
int sum = li_boost_shared_ptr_bits.sum(v);
|
||||
if (sum != 66)
|
||||
throw new ApplicationException("sum is wrong");
|
||||
|
||||
HiddenDestructor hidden = HiddenDestructor.create();
|
||||
hidden.Dispose();
|
||||
}
|
||||
}
|
||||
31
Examples/test-suite/csharp/li_std_combinations_runme.cs
Normal file
31
Examples/test-suite/csharp/li_std_combinations_runme.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using li_std_combinationsNamespace;
|
||||
|
||||
public class li_std_combinations_runme {
|
||||
public static void Main() {
|
||||
VectorPairIntString vpis = new VectorPairIntString();
|
||||
vpis.Add(new PairIntString(123, "one hundred and twenty three"));
|
||||
|
||||
VectorString vs = new VectorString();
|
||||
vs.Add("hi");
|
||||
PairIntVectorString pivs = new PairIntVectorString(456, vs);
|
||||
if (pivs.second[0] != "hi")
|
||||
throw new ApplicationException("PairIntVectorString");
|
||||
|
||||
VectorVectorString vvs = new VectorVectorString();
|
||||
vvs.Add(vs);
|
||||
|
||||
PairIntPairIntString pipis = new PairIntPairIntString(12, new PairIntString(3, "4"));
|
||||
if (pipis.first != 12)
|
||||
throw new ApplicationException("PairIntPairIntString");
|
||||
|
||||
PairDoubleString pds = new PairDoubleString(12.34, "okay");
|
||||
VectorPairDoubleString vpds = new VectorPairDoubleString();
|
||||
vpds.Add(pds);
|
||||
|
||||
// Check SWIG_STD_VECTOR_ENHANCED macro - it provides the Contains method
|
||||
if (!vpds.Contains(pds))
|
||||
throw new ApplicationException("VectorPairDoubleString");
|
||||
}
|
||||
}
|
||||
|
||||
24
Examples/test-suite/csharp/rename_pcre_enum_runme.cs
Normal file
24
Examples/test-suite/csharp/rename_pcre_enum_runme.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using rename_pcre_enumNamespace;
|
||||
|
||||
public class runme {
|
||||
static void Main() {
|
||||
Foo foo = Foo.First;
|
||||
if ( foo == Foo.Second )
|
||||
throw new Exception("Enum values should be different");
|
||||
|
||||
// Check that Foo_Max enum element was ignored.
|
||||
int numFooEnumElements = Enum.GetValues(typeof(Foo)).Length;
|
||||
if ( numFooEnumElements != 2 )
|
||||
throw new Exception(String.Format("Enum should have 2 elements, not {0}",
|
||||
numFooEnumElements));
|
||||
|
||||
BoundaryCondition bc = BoundaryCondition.MaxMax;
|
||||
if ( (int)bc != 2 )
|
||||
throw new Exception("Wrong enum value");
|
||||
|
||||
Colour c = Colour.red;
|
||||
if ( c == Colour.blue )
|
||||
throw new Exception("Enum values should be different");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue