Merge from trunk
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12976 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
commit
02d58e0125
99 changed files with 1847 additions and 418 deletions
27
Examples/test-suite/csharp/li_std_vector_enum_runme.cs
Normal file
27
Examples/test-suite/csharp/li_std_vector_enum_runme.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// This test tests all the methods in the C# collection wrapper
|
||||
|
||||
using System;
|
||||
using li_std_vector_enumNamespace;
|
||||
|
||||
public class li_std_vector_enum_runme {
|
||||
|
||||
public static void Main() {
|
||||
EnumVector ev = new EnumVector();
|
||||
|
||||
check((int)ev.nums[0], 10);
|
||||
check((int)ev.nums[1], 20);
|
||||
check((int)ev.nums[2], 30);
|
||||
|
||||
int expected = 10;
|
||||
foreach (EnumVector.numbers val in ev.nums) {
|
||||
check((int)val, expected);
|
||||
expected += 10;
|
||||
}
|
||||
}
|
||||
|
||||
private static void check(int a, int b) {
|
||||
if (a != b)
|
||||
throw new ApplicationException("values don't match");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue