linux-packaging-mono/mcs/tests/gtest-optional-03.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

50 lines
713 B
C#

// Compiler options: -r:gtest-optional-03-lib.dll
using System;
class C
{
static int Test (int i = 1, string s = "", bool b = false, ushort u = 4)
{
return i;
}
public static int Main ()
{
if (Test () != 1)
return 1;
if (B.TestString () != "mono")
return 3;
if (B.TestString ("top") != "top")
return 4;
if (B.TestB () != null)
return 5;
if (B.Test<ushort> () != 0)
return 6;
if (B.TestDecimal (2) != decimal.MinValue)
return 7;
if (B.TestDecimal (2, 5) != 5)
return 8;
if (B.TestEnum () != E.Value)
return 9;
B b = new B ();
b [1] = 3;
if (b [0] != 6)
return 10;
B.TestNew ();
Console.WriteLine ("ok");
return 0;
}
}