public static void Run() { NotEmptyStructConstrainedGenQA <int>?s = null; Console.WriteLine("NotEmptyStructConstrainedGenQA<int>"); Assert.IsTrue(BoxUnboxToNQ(s)); Assert.IsTrue(BoxUnboxToQ(s)); Assert.IsTrue(BoxUnboxToNQGen(s)); Assert.IsTrue(BoxUnboxToQGen(s)); }
private static int Main() { NotEmptyStructConstrainedGenQA <int>?s = null; if (BoxUnboxToNQ(s) && BoxUnboxToQ(s) && BoxUnboxToNQGen(s) && BoxUnboxToQGen(s)) { return(ExitCode.Passed); } else { return(ExitCode.Failed); } }
private static int Main() { NotEmptyStructConstrainedGenQA <int>?s = Helper.Create(default(NotEmptyStructConstrainedGenQA <int>)); if (BoxUnboxToNQ(s) && BoxUnboxToQ(s)) { return(ExitCode.Passed); } else { return(ExitCode.Failed); } }
public static bool Compare(NotEmptyStructConstrainedGenQA <int>?val, NotEmptyStructConstrainedGenQA <int> val1) { return(Compare(val.Value, val1)); }
public static bool Compare(NotEmptyStructConstrainedGenQA <int> val, NotEmptyStructConstrainedGenQA <int> val1) { return(val.Field[0] == val1.Field[0]); }
public static NotEmptyStructConstrainedGenQA <int> Create(NotEmptyStructConstrainedGenQA <int> val) { NotEmptyStructConstrainedGenQA <int> neq = new NotEmptyStructConstrainedGenQA <int>(); neq.Field = new int?[] { 17 }; return(neq); }