"disable_omit_fp" can now be included in MONO_DEBUG
[mono-project.git] / mcs / tests / gtest-308.cs
blob8f2ac9d56c921e977496eaaab7a511d362ba2e5b
1 using System;
3 public class Test {
4 public static Comparison<U> WrapComparison<U>(Comparison<U> comparison)
6 return delegate(U x, U y) { return comparison(x, y); };
9 public delegate int MyComparison<V> (V x, V y);
10 public static MyComparison<W> WrapMyComparison<W>(MyComparison<W> myComparison)
12 return delegate(W x, W y) { return myComparison(x, y); };
16 public class Foo {
17 static int compare (int x, int y)
18 { return x - y; }
19 static int compare (string x, string y)
20 { return string.Compare (x, y); }
21 static void test (int i)
23 if (i != 0)
24 throw new Exception (""+i);
26 public static void Main ()
28 Comparison<int> ci = Test.WrapComparison<int> (compare);
29 Comparison<string> cs = Test.WrapComparison<string> (compare);
30 Test.MyComparison<int> mci = Test.WrapMyComparison<int> (compare);
31 Test.MyComparison<string> mcs = Test.WrapMyComparison<string> (compare);
32 test (ci (1,1));
33 test (cs ("h", "h"));
34 test (mci (2,2));
35 test (mcs ("g", "g"));