/trunk/Examples/test-suite/csharp/pointer_reference_runme.cs
C# | 21 lines | 13 code | 7 blank | 1 comment | 8 complexity | e0ea3f5e300e749c36fdaa7096892c28 MD5 | raw file
1// This test tests all the methods in the C# collection wrapper 2 3using System; 4using pointer_referenceNamespace; 5 6public class pointer_reference_runme { 7 8 public static void Main() { 9 Struct s = pointer_reference.get(); 10 if (s.value != 10) throw new Exception("get test failed"); 11 12 Struct ss = new Struct(20); 13 pointer_reference.set(ss); 14 if (Struct.instance.value != 20) throw new Exception("set test failed"); 15 16 if (pointer_reference.overloading(1) != 111) throw new Exception("overload test 1 failed"); 17 if (pointer_reference.overloading(ss) != 222) throw new Exception("overload test 2 failed"); 18 } 19 20} 21