public void FunctionPointersAndCallSites()
{
TestModule ("fptr.exe", module => {
var type = module.Types [0];
var start = type.GetMethod ("Start");
Assert.IsNotNull (start);
AssertCode (@"
.locals init ()
IL_0000: ldc.i4.1
IL_0001: call method System.Int32 *(System.Int32) MakeDecision::Decide()
IL_0006: calli System.Int32(System.Int32)
IL_000b: call System.Void System.Console::WriteLine(System.Int32)
IL_0010: ldc.i4.1
IL_0011: call method System.Int32 *(System.Int32) MakeDecision::Decide()
IL_0016: calli System.Int32(System.Int32)
IL_001b: call System.Void System.Console::WriteLine(System.Int32)
IL_0020: ldc.i4.1
IL_0021: call method System.Int32 *(System.Int32) MakeDecision::Decide()
IL_0026: calli System.Int32(System.Int32)
IL_002b: call System.Void System.Console::WriteLine(System.Int32)
IL_0030: ret
", start);
}, verify: false);
}