X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Fgtest-optional-11.cs;h=85b035de657ec22183e07e72896d62cdf5272d4e;hb=4ccd94d7ccf69cc52532ea920b2d1b48f9c6a7cc;hp=a97b41d6a4f2cf9d9c8f3eac761dfe355b3dd9d7;hpb=9827b74a95127d33aac3512363fc5ce1498d76a2;p=mono.git diff --git a/mcs/tests/gtest-optional-11.cs b/mcs/tests/gtest-optional-11.cs index a97b41d6a4f..85b035de657 100644 --- a/mcs/tests/gtest-optional-11.cs +++ b/mcs/tests/gtest-optional-11.cs @@ -1,3 +1,5 @@ +// Compiler options: -r:gtest-optional-11-lib.dll + using System; using System.Reflection; using System.Runtime.InteropServices; @@ -19,6 +21,11 @@ public class C return a; } + public static int TestD ([Optional] int a, int i) + { + return a; + } + public static int Main () { if (TestA () != 1) @@ -33,6 +40,29 @@ public class C if (TestC () != Missing.Value) return 4; + if (TestD (i:2) != 0) + return 5; + + if (Lib.TestA () != 1) + return 11; + + if (Lib.TestB (-4) != 0) + return 12; + + if (Lib.TestB ((object) null) != Missing.Value) + return 13; + + if (Lib.TestC () != Missing.Value) + return 14; + + if (Lib.TestC2 () != null) + return 15; + + if (Lib.TestD (i:2) != 0) + return 16; + + Lib.TestS (); + return 0; } }