提交 f0aba114 编写于 作者: A Andrew Casey

Merge pull request #3223 from amcasey/SkippedTests

Clean up EE skipped tests
......@@ -3339,7 +3339,8 @@ .locals init (object V_0)
/// containing the current frame, so new instances can
/// be used interchangeably with existing instances.
/// </summary>
[Fact(Skip = "error CS0019: Operator '==' cannot be applied to operands of type ...")]
[WorkItem(3188, "https://github.com/dotnet/roslyn/issues/3188")]
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/3188")]
public void EvaluateExistingAnonymousType_2()
{
var source =
......
......@@ -15,6 +15,7 @@
using System.Reflection.Metadata;
using Xunit;
using Resources = Microsoft.CodeAnalysis.ExpressionEvaluator.UnitTests.Resources;
using System.Reflection;
namespace Microsoft.CodeAnalysis.CSharp.UnitTests
{
......@@ -294,7 +295,7 @@ .maxstack 2
}
[WorkItem(1117084)]
[Fact(Skip = "1114866")]
[Fact]
public void OtherFrameworkAssembly()
{
var source =
......@@ -310,32 +311,21 @@ static void M(Windows.UI.Xaml.FrameworkElement f)
ImmutableArray.Create(MscorlibRef).Concat(ExpressionCompilerTestHelpers.GetRuntimeWinMds("Windows.Foundation", "Windows.UI", "Windows.UI.Xaml")));
var context = CreateMethodContext(runtime, "C.M");
string error;
ResultProperties resultProperties;
ImmutableArray<AssemblyIdentity> missingAssemblyIdentities;
var testData = new CompilationTestData();
context.CompileExpression(
var result = context.CompileExpression(
"f.RenderSize",
DkmEvaluationFlags.TreatAsExpression,
NoAliases,
DiagnosticFormatter.Instance,
out resultProperties,
out error,
out missingAssemblyIdentities,
EnsureEnglishUICulture.PreferredOrNull,
testData);
testData.GetMethodData("<>x.<>m0").VerifyIL(
@"{
// Code size 55 (0x37)
.maxstack 2
IL_0000: ldstr ""s""
IL_0005: call ""object Microsoft.VisualStudio.Debugger.Clr.IntrinsicMethods.GetObjectByAlias(string)""
IL_000a: castclass ""Windows.Storage.StorageFolder""
IL_000f: callvirt ""Windows.Storage.FileAttributes Windows.Storage.StorageFolder.Attributes.get""
IL_0014: box ""Windows.Storage.FileAttributes""
IL_0019: dup
IL_001a: brtrue.s IL_0036
IL_001c: pop
IL_001d: ldstr ""d""
IL_0022: call ""object Microsoft.VisualStudio.Debugger.Clr.IntrinsicMethods.GetObjectByAlias(string)""
IL_0027: unbox.any ""Windows.Foundation.DateTime""
IL_002c: ldfld ""long Windows.Foundation.DateTime.UniversalTime""
IL_0031: box ""long""
IL_0036: ret
}");
var expectedAssemblyIdentity = WinRtRefs.Single(r => r.Display == "System.Runtime.WindowsRuntime.dll").GetAssemblyIdentity();
Assert.Equal(expectedAssemblyIdentity, missingAssemblyIdentities.Single());
}
[WorkItem(1154988)]
......
......@@ -332,7 +332,8 @@ class Wrapper
EvalResult("NoDisplayPointer", PointerToString(IntPtr.Zero), "NoDisplay*", "wrapper.display.NoDisplayPointer"));
}
[Fact(Skip = "Issue #321")]
[WorkItem(321, "https://github.com/dotnet/roslyn/issues/321")]
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/321")]
public void PointerDereferenceExpansion_NonNull()
{
var source = @"
......
......@@ -2006,7 +2006,7 @@ End Function, Func(Of E(Of T)))()")
End Sub
<WorkItem(986227)>
<Fact(Skip:="986227")>
<Fact>
Public Sub RewriteSequenceTemps()
Const source =
"Class C
......@@ -2027,16 +2027,20 @@ End Class"
Assert.Equal(returnType.ContainingSymbol, method)
Dim locals = methodData.ILBuilder.LocalSlotManager.LocalsInOrder()
' Both locals of type T from <>m0(Of T): the original local
' and the temporary for "New T()" in (New T()).F = 1.
Assert.Equal(locals.Length, 2)
For Each local In locals
Dim localType = DirectCast(local.Type, TypeSymbol)
Assert.Equal(localType.ContainingSymbol, method)
Next
Assert.Equal(method, DirectCast(locals.Single().Type, TypeSymbol).ContainingSymbol)
testData.GetMethodData("<>x.<>m0").VerifyIL("
{
...
// Code size 23 (0x17)
.maxstack 3
.locals init (T V_0) //o
IL_0000: call ""Function System.Activator.CreateInstance(Of T)() As T""
IL_0005: dup
IL_0006: box ""T""
IL_000b: ldc.i4.1
IL_000c: box ""Integer""
IL_0011: stfld ""C.F As Object""
IL_0016: ret
}")
End Sub
......@@ -3902,8 +3906,8 @@ End Class
")
End Sub
<WorkItem(1105859)>
<Fact(Skip:="1105859")>
<WorkItem(1450, "https://github.com/dotnet/roslyn/issues/1450")>
<Fact(Skip:="https://github.com/dotnet/roslyn/issues/1450")>
Public Sub WithExpression()
Const source =
"Structure S
......@@ -4003,7 +4007,7 @@ End Class"
End Sub
<WorkItem(1112496)>
<Fact(Skip:="1112496")>
<Fact>
Public Sub EvaluateLocalInAsyncLambda()
Const source = "
Imports System.Threading.Tasks
......@@ -4019,7 +4023,7 @@ Module Module1
End Module"
Dim compilation = CreateCompilationWithMscorlib45AndVBRuntime(MakeSources(source), options:=TestOptions.DebugDll)
Dim runtime = CreateRuntimeInstance(compilation)
Dim context = CreateMethodContext(runtime, "Module1._Closure$__.VB$StateMachine___Lambda$__0-1.MoveNext")
Dim context = CreateMethodContext(runtime, "Module1._Closure$__.VB$StateMachine___Lambda$__0-0.MoveNext")
Dim errorMessage As String = Nothing
Dim testData = New CompilationTestData()
Dim result = context.CompileExpression("i", errorMessage, testData)
......@@ -4028,12 +4032,12 @@ End Module"
{
// Code size 7 (0x7)
.maxstack 1
.locals init (Integer V_0, //$VB$ResumableLocal_i$0
.locals init (Integer V_0,
Integer V_1,
System.Threading.Tasks.Task(Of Integer) V_2,
System.Exception V_3)
IL_0000: ldarg.0
IL_0001: ldfld ""Module1._Closure$__.VB$StateMachine___Lambda$__0-1.$VB$ResumableLocal_i$0 As Integer""
IL_0001: ldfld ""Module1._Closure$__.VB$StateMachine___Lambda$__0-0.$VB$ResumableLocal_i$0 As Integer""
IL_0006: ret
}")
End Sub
......
......@@ -1401,7 +1401,7 @@ End Class
locals.Free()
End Sub
<Fact(Skip:="1002672"), WorkItem(1002672)>
<Fact, WorkItem(1002672, "DevDiv")>
Public Sub Async_InstanceMethod_Generic()
Const source = "
Imports System.Threading.Tasks
......@@ -1423,70 +1423,65 @@ End Structure
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(
runtime,
methodName:="S.VB$StateMachine_0_F.MoveNext")
methodName:="S.VB$StateMachine_2_F.MoveNext")
Dim testData As New CompilationTestData()
Dim locals = ArrayBuilder(Of LocalAndMethod).GetInstance()
Dim typeName As String = Nothing
context.CompileGetLocals(locals, argumentsOnly:=False, typeName:=typeName, testData:=testData)
Assert.Equal(5, locals.Count)
Assert.Equal(4, locals.Count)
VerifyLocal(testData, "<>x(Of T, U)", locals(0), "<>m0", "Me", expectedILOpt:="
{
// Code size 7 (0x7)
.maxstack 1
.locals init (Object V_0, //VB$returnTemp
Integer V_1, //VB$cachedState
System.Threading.Tasks.Task(Of Object) V_2, //MoveNext
T V_3, //z
T V_4,
System.Exception V_5)
.locals init (Object V_0,
Integer V_1,
System.Threading.Tasks.Task(Of Object) V_2,
T V_3,
System.Exception V_4)
IL_0000: ldarg.0
IL_0001: ldfld ""Friend $VB$Me As S(Of T)""
IL_0001: ldfld ""S(Of T).VB$StateMachine_2_F(Of U).$VB$Me As S(Of T)""
IL_0006: ret
}
")
VerifyLocal(testData, "<>x(Of T, U)", locals(1), "<>m1", "MoveNext") ' We don't actually step into MoveNext, so this does not appear in the UI.
VerifyLocal(testData, "<>x(Of T, U)", locals(2), "<>m2", "z", expectedILOpt:="
VerifyLocal(testData, "<>x(Of T, U)", locals(1), "<>m1", "y", expectedILOpt:="
{
// Code size 2 (0x2)
// Code size 7 (0x7)
.maxstack 1
.locals init (Object V_0, //VB$returnTemp
Integer V_1, //VB$cachedState
System.Threading.Tasks.Task(Of Object) V_2, //MoveNext
T V_3, //z
T V_4,
System.Exception V_5)
IL_0000: ldloc.3
IL_0001: ret
.locals init (Object V_0,
Integer V_1,
System.Threading.Tasks.Task(Of Object) V_2,
T V_3,
System.Exception V_4)
IL_0000: ldarg.0
IL_0001: ldfld ""S(Of T).VB$StateMachine_2_F(Of U).$VB$Local_y As U""
IL_0006: ret
}
")
VerifyLocal(testData, "<>x(Of T, U)", locals(3), "<>m3", "y", expectedILOpt:="
VerifyLocal(testData, "<>x(Of T, U)", locals(2), "<>m2", "z", expectedILOpt:="
{
// Code size 7 (0x7)
.maxstack 1
.locals init (Object V_0, //VB$returnTemp
Integer V_1, //VB$cachedState
System.Threading.Tasks.Task(Of Object) V_2, //MoveNext
T V_3, //z
T V_4,
System.Exception V_5)
.locals init (Object V_0,
Integer V_1,
System.Threading.Tasks.Task(Of Object) V_2,
T V_3,
System.Exception V_4)
IL_0000: ldarg.0
IL_0001: ldfld ""Friend $VB$Local_y As U""
IL_0001: ldfld ""S(Of T).VB$StateMachine_2_F(Of U).$VB$ResumableLocal_z$0 As T""
IL_0006: ret
}
")
' TODO: Don't show does U in the UI (DevDiv #1014763).
VerifyLocal(testData, "<>x(Of T, U)", locals(4), "<>m4", "<>TypeVariables", expectedILOpt:="
VerifyLocal(testData, "<>x(Of T, U)", locals(3), "<>m3", "<>TypeVariables", expectedFlags:=DkmClrCompilationResultFlags.ReadOnlyResult, expectedILOpt:="
{
// Code size 6 (0x6)
.maxstack 1
.locals init (Object V_0, //VB$returnTemp
Integer V_1, //VB$cachedState
System.Threading.Tasks.Task(Of Object) V_2, //MoveNext
T V_3, //z
T V_4,
System.Exception V_5)
.locals init (Object V_0,
Integer V_1,
System.Threading.Tasks.Task(Of Object) V_2,
T V_3,
System.Exception V_4)
IL_0000: newobj ""Sub <>c__TypeVariables(Of T, U)..ctor()""
IL_0005: ret
}
......@@ -1495,7 +1490,7 @@ End Structure
locals.Free()
End Sub
<Fact(Skip:="1002672"), WorkItem(1002672)>
<Fact, WorkItem(1002672, "DevDiv")>
Public Sub Async_StaticMethod()
Const source = "
Imports System.Threading.Tasks
......@@ -1519,45 +1514,41 @@ End Class
Dim runtime = CreateRuntimeInstance(comp)
Dim context = CreateMethodContext(
runtime,
methodName:="C.VB$StateMachine_1_M.MoveNext")
methodName:="C.VB$StateMachine_2_M.MoveNext")
Dim testData As New CompilationTestData()
Dim locals = ArrayBuilder(Of LocalAndMethod).GetInstance()
Dim typeName As String = Nothing
context.CompileGetLocals(locals, argumentsOnly:=False, typeName:=typeName, testData:=testData)
Assert.Equal(3, locals.Count)
Assert.Equal(2, locals.Count)
VerifyLocal(testData, typeName, locals(0), "<>m0", "MoveNext") ' We don't actually step into MoveNext, so this does not appear in the UI.
VerifyLocal(testData, typeName, locals(1), "<>m1", "y", expectedILOpt:="
VerifyLocal(testData, typeName, locals(0), "<>m0", "x", expectedILOpt:="
{
// Code size 2 (0x2)
// Code size 7 (0x7)
.maxstack 1
.locals init (Integer V_0, //VB$cachedState
System.Threading.Tasks.Task V_1, //MoveNext
Object V_2, //y
System.Runtime.CompilerServices.TaskAwaiter(Of Object) V_3,
Boolean V_4,
Object V_5,
System.Runtime.CompilerServices.TaskAwaiter(Of Object) V_6,
System.Exception V_7)
IL_0000: ldloc.2
IL_0001: ret
.locals init (Integer V_0,
System.Runtime.CompilerServices.TaskAwaiter(Of Object) V_1,
C.VB$StateMachine_2_M V_2,
Object V_3,
System.Runtime.CompilerServices.TaskAwaiter(Of Object) V_4,
System.Exception V_5)
IL_0000: ldarg.0
IL_0001: ldfld ""C.VB$StateMachine_2_M.$VB$Local_x As Object""
IL_0006: ret
}
")
VerifyLocal(testData, typeName, locals(2), "<>m2", "x", expectedILOpt:="
VerifyLocal(testData, typeName, locals(1), "<>m1", "y", expectedILOpt:="
{
// Code size 7 (0x7)
.maxstack 1
.locals init (Integer V_0, //VB$cachedState
System.Threading.Tasks.Task V_1, //MoveNext
Object V_2, //y
System.Runtime.CompilerServices.TaskAwaiter(Of Object) V_3,
Boolean V_4,
Object V_5,
System.Runtime.CompilerServices.TaskAwaiter(Of Object) V_6,
System.Exception V_7)
.locals init (Integer V_0,
System.Runtime.CompilerServices.TaskAwaiter(Of Object) V_1,
C.VB$StateMachine_2_M V_2,
Object V_3,
System.Runtime.CompilerServices.TaskAwaiter(Of Object) V_4,
System.Exception V_5)
IL_0000: ldarg.0
IL_0001: ldfld ""C.VB$StateMachine_1_M.$VB$Local_x As Object""
IL_0001: ldfld ""C.VB$StateMachine_2_M.$VB$ResumableLocal_y$0 As Object""
IL_0006: ret
}
")
......
......@@ -366,8 +366,8 @@ End Class"
''' defined in a previous evaluation, say an anonymous
''' type (e.g.: evaluate "o" after "o = New With { .P = 1 }").
''' </summary>
<WorkItem(1102923)>
<Fact(Skip:="1102923")>
<WorkItem(1449, "https://github.com/dotnet/roslyn/issues/1449")>
<Fact(Skip:="https://github.com/dotnet/roslyn/issues/1449")>
Public Sub UnrecognizedAssembly()
Const source =
"Friend Structure S(Of T)
......
......@@ -92,7 +92,8 @@ End Class"
EvalResult("F", "1", "Object {Integer}", "(New C()).s1.F"))
End Sub
<Fact(Skip:="Issue #321")>
<WorkItem(321, "https://github.com/dotnet/roslyn/issues/321")>
<Fact(Skip:="https://github.com/dotnet/roslyn/issues/321")>
Public Sub Pointers()
Dim source =
".class private auto ansi beforefieldinit C
......@@ -627,7 +628,7 @@ End Class
EvalResult("S", "42", "Integer", "A.S"))
End Sub
<Fact(Skip:="1074435"), WorkItem(1074435)>
<Fact, WorkItem(1074435, "DevDiv")>
Public Sub NameConflictsWithInterfaceReimplementation()
Dim source = "
Interface I
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册