提交 b76c7308 编写于 作者: Y yair halberstadt

Revert "Use ConditionalFact"

This reverts commit c2a7ed11.
上级 c2a7ed11
......@@ -15490,7 +15490,7 @@ class C1
var comp = CompileAndVerify(source, expectedOutput: "321 123", references: new[] { CSharpRef });
}
[ConditionalFact(typeof(CoreClrOnly))]
[Fact]
[WorkItem(41947, "https://github.com/dotnet/roslyn/issues/41947")]
public void DynamicInGenericLocalFunction1()
{
......@@ -15508,8 +15508,10 @@ void M<T>(T slot)
}
}
}";
CompileAndVerify(source, expectedOutput: "True", references: new[] { CSharpRef })
.VerifyTypeIL("Program", @"
VerifyTypeIL(
CompileAndVerify(source, expectedOutput: "True", references: new[] { CSharpRef }),
"Program",
@"
.class private auto ansi beforefieldinit Program
extends [netstandard]System.Object
{
......@@ -15582,7 +15584,7 @@ .maxstack 3
} // end of class Program");
}
[ConditionalFact(typeof(CoreClrOnly))]
[Fact]
[WorkItem(41947, "https://github.com/dotnet/roslyn/issues/41947")]
public void DynamicInGenericLocalFunction2()
{
......@@ -15609,8 +15611,10 @@ public static void Main()
}
}
}";
CompileAndVerify(source, expectedOutput: "True", references: new[] { CSharpRef })
.VerifyTypeIL("Program", @"
VerifyTypeIL(
CompileAndVerify(source, expectedOutput: "True", references: new[] { CSharpRef }),
"Program",
@"
.class private auto ansi beforefieldinit Program
extends [netstandard]System.Object
{
......@@ -15710,7 +15714,7 @@ .maxstack 3
} // end of class Program");
}
[ConditionalFact(typeof(CoreClrOnly))]
[Fact]
[WorkItem(41947, "https://github.com/dotnet/roslyn/issues/41947")]
public void DynamicInGenericLocalFunction3()
{
......@@ -15733,8 +15737,10 @@ void M2(T1 b)
}
}
}";
CompileAndVerify(source, expectedOutput: "True", references: new[] { CSharpRef })
.VerifyTypeIL("Program", @"
VerifyTypeIL(
CompileAndVerify(source, expectedOutput: "True", references: new[] { CSharpRef }),
"Program",
@"
.class private auto ansi beforefieldinit Program
extends [netstandard]System.Object
{
......@@ -15819,7 +15825,7 @@ .maxstack 3
} // end of class Program");
}
[ConditionalFact(typeof(CoreClrOnly))]
[Fact]
[WorkItem(41947, "https://github.com/dotnet/roslyn/issues/41947")]
public void DynamicInGenericLocalFunction4()
{
......@@ -15842,8 +15848,10 @@ void M2<T>(T b)
}
}
}";
CompileAndVerify(source, expectedOutput: "True", references: new[] { CSharpRef })
.VerifyTypeIL("Program", @"
VerifyTypeIL(
CompileAndVerify(source, expectedOutput: "True", references: new[] { CSharpRef }),
"Program",
@"
.class private auto ansi beforefieldinit Program
extends [netstandard]System.Object
{
......@@ -15931,6 +15939,16 @@ .maxstack 3
} // end of class Program");
}
private static void VerifyTypeIL(CompilationVerifier compilation, string typeName, string expected)
{
// .Net Core has different assemblies for the same standard library types as .Net Framework, meaning that that the emitted output will be different to the expected if we run them .Net Framework
// Since we do not expect there to be any meaningful differences between output for .Net Core and .Net Framework, we will skip these tests on .Net Framework
if (ExecutionConditionUtil.IsCoreClr)
{
compilation.VerifyTypeIL(typeName, expected);
}
}
#endregion
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册