提交 cfadc642 编写于 作者: S Stephen Toub 提交者: GitHub

Fix visibility of several test methods (dotnet/corefx#36380)



Commit migrated from https://github.com/dotnet/corefx/commit/6038ddaa0ff66984fe157958ded2a2327ba1e743
上级 01de3a49
......@@ -522,7 +522,7 @@ class Flag
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInvokingStaticConstructorsSupported))]
static void TestingBindingFlags()
public static void TestingBindingFlags()
{
Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(typeof(ClassWithPrivateCtor), BindingFlags.Public | BindingFlags.Instance, null, null, CultureInfo.CurrentCulture));
Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(typeof(ClassWithPrivateCtor), BindingFlags.Public | BindingFlags.Instance, null, new object[] { 1, 2, 3 }, CultureInfo.CurrentCulture));
......@@ -553,7 +553,7 @@ static void TestingBindingFlags()
}
[Fact]
static void TestingBindingFlagsInstanceOnly()
public static void TestingBindingFlagsInstanceOnly()
{
Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(typeof(HasPublicCtor), default(BindingFlags), null, null, null));
Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(typeof(HasPublicCtor), BindingFlags.NonPublic | BindingFlags.Instance, null, null, null));
......@@ -575,7 +575,7 @@ static void TestingBindingFlagsInstanceOnly()
}
[Fact]
static void TestingBindingFlags1()
public static void TestingBindingFlags1()
{
Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(typeof(ClassWithPrivateCtor), BindingFlags.Public | BindingFlags.Instance, null, null, CultureInfo.CurrentCulture, null));
Assert.Throws<MissingMethodException>(() => Activator.CreateInstance(typeof(ClassWithPrivateCtor), BindingFlags.Public | BindingFlags.Instance, null, new object[] { 1, 2, 3 }, CultureInfo.CurrentCulture, null));
......@@ -586,7 +586,7 @@ static void TestingBindingFlags1()
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
static void TestingActivationAttributes()
public static void TestingActivationAttributes()
{
Assert.Throws<PlatformNotSupportedException>(() => Activator.CreateInstance(typeof(ClassWithIsTestedAttribute), null, new object[] { new object() }));
Assert.Throws<PlatformNotSupportedException>(() => Activator.CreateInstance(typeof(ClassWithIsTestedAttribute), null, new object[] { new IsTestedAttribute(true) }));
......@@ -599,7 +599,7 @@ static void TestingActivationAttributes()
}
[Fact]
static void TestingActivationAttributes1()
public static void TestingActivationAttributes1()
{
Activator.CreateInstance(typeof(ClassWithIsTestedAttribute), null, null);
Activator.CreateInstance(typeof(ClassWithIsTestedAttribute), null, new object[] { });
......
......@@ -106,7 +106,7 @@ public void CompareTo_Other_ReturnsExpected(bool b, object obj, int expected)
[InlineData(true, "true")]
[InlineData(false, 0)]
[InlineData(false, "false")]
private void CompareTo_ObjectNotBool_ThrowsArgumentException(bool b, object obj)
public void CompareTo_ObjectNotBool_ThrowsArgumentException(bool b, object obj)
{
AssertExtensions.Throws<ArgumentException>(null, () => b.CompareTo(obj));
}
......
......@@ -251,7 +251,7 @@ yield return
[Theory]
[MemberData(nameof(SignalAndWait_MemberData))]
private static void SignalAndWait(
public static void SignalAndWait(
WaitHandle toSignal,
AutoResetEvent toWaitOn,
Func<WaitHandle, WaitHandle, bool> callSignalAndWait,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册