You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
@ -73,7 +73,7 @@ namespace MonoTests.System.Reflection
|
||||
}
|
||||
}
|
||||
|
||||
#if !NET_2_1
|
||||
#if !MOBILE
|
||||
public enum ParamEnum {
|
||||
None = 0,
|
||||
Foo = 1,
|
||||
@ -97,14 +97,12 @@ namespace MonoTests.System.Reflection
|
||||
Assert.AreEqual (ParamEnum.Foo, info [5].DefaultValue, "#2");
|
||||
}
|
||||
|
||||
#if NET_4_5
|
||||
[Test]
|
||||
public void HasDefaultValueEnum () {
|
||||
ParameterInfo[] info = typeof (ParameterInfoTest).GetMethod ("paramMethod").GetParameters ();
|
||||
|
||||
Assert.IsTrue (info [5].HasDefaultValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
public static void Sample2 ([DecimalConstantAttribute(2,2,2,2,2)] decimal a, [DateTimeConstantAttribute(123456)] DateTime b) {}
|
||||
|
||||
@ -125,7 +123,6 @@ namespace MonoTests.System.Reflection
|
||||
Assert.AreEqual (pi [1].DefaultValue.GetType (), typeof (Missing), "#2");
|
||||
}
|
||||
|
||||
#if NET_4_5
|
||||
[Test]
|
||||
public void TestHasDefaultValues ()
|
||||
{
|
||||
@ -135,7 +132,6 @@ namespace MonoTests.System.Reflection
|
||||
Assert.IsFalse (pi [1].HasDefaultValue, "#2");
|
||||
Assert.IsTrue (pi [2].HasDefaultValue, "#3");
|
||||
}
|
||||
#endif
|
||||
|
||||
public void Sample (int a, [Optional] int b, object c = null)
|
||||
{
|
||||
@ -252,13 +248,11 @@ namespace MonoTests.System.Reflection
|
||||
Assert.AreEqual (decimal.MaxValue, info [0].DefaultValue);
|
||||
}
|
||||
|
||||
#if NET_4_5
|
||||
[Test]
|
||||
public void HasDefaultValueDecimal () {
|
||||
var info = typeof (ParameterInfoTest).GetMethod ("TestC").GetParameters ();
|
||||
Assert.IsTrue (info [0].HasDefaultValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
class TestParamAttribute : Attribute
|
||||
{
|
||||
@ -344,13 +338,11 @@ namespace MonoTests.System.Reflection
|
||||
Assert.AreEqual (0, p.GetCustomAttributes (typeof (FlagsAttribute), false).Length, "#3");
|
||||
Assert.AreEqual (0, p.GetOptionalCustomModifiers ().Length, "#4");
|
||||
Assert.AreEqual (0, p.GetRequiredCustomModifiers ().Length, "#5");
|
||||
#if NET_4_5
|
||||
try {
|
||||
var ign = p.HasDefaultValue;
|
||||
Assert.Fail ("#6");
|
||||
} catch (NotImplementedException) {
|
||||
}
|
||||
#endif
|
||||
Assert.IsFalse (p.IsIn, "#7");
|
||||
#if FEATURE_USE_LCID
|
||||
Assert.IsFalse (p.IsLcid, "#8");
|
||||
@ -358,13 +350,11 @@ namespace MonoTests.System.Reflection
|
||||
Assert.IsFalse (p.IsOptional, "#9");
|
||||
Assert.IsFalse (p.IsOut, "#10");
|
||||
Assert.IsFalse (p.IsRetval, "#10");
|
||||
#if NET_4_5
|
||||
try {
|
||||
var ign = p.CustomAttributes;
|
||||
Assert.Fail ("#11");
|
||||
} catch (NotImplementedException) {
|
||||
}
|
||||
#endif
|
||||
try {
|
||||
p.GetCustomAttributesData ();
|
||||
Assert.Fail ("#12");
|
||||
@ -446,9 +436,7 @@ namespace MonoTests.System.Reflection
|
||||
Assert.IsFalse (p2.IsIn, "#1");
|
||||
p2.MyAttrsImpl = ParameterAttributes.In;
|
||||
Assert.IsTrue (p2.IsIn, "#2");
|
||||
#if NET_4_5
|
||||
Assert.AreEqual (p2.myList, p2.CustomAttributes, "#3");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user