"disable_omit_fp" can now be included in MONO_DEBUG
[mono-project.git] / mcs / tests / gtest-etree-31.cs
blob350a64aa37ecdee9d92878da833c33a7d5f60f98
1 using System;
2 using System.Linq.Expressions;
4 class X
6 class HasAction
8 public void Start ()
13 public static int Main ()
15 var expectedObject = typeof (HasAction).GetMethod("Start");
17 Expression<Func<HasAction, Action>> methodToUse = r => r.Start;
19 UnaryExpression unary = methodToUse.Body as UnaryExpression;
20 MethodCallExpression methodCall = unary.Operand as MethodCallExpression;
21 ConstantExpression constantExpression = methodCall.Object as ConstantExpression;
23 if (expectedObject != constantExpression.Value)
24 return 1;
26 if (methodCall.Object == null)
27 return 2;
29 return 0;