Respond to PR feedback

上级 9237a47c
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if NET461
using System;
using System.Collections.Immutable;
using System.IO;
......@@ -97,7 +96,7 @@ internal override void ReadKeysFromContainer(string keyContainer, out ImmutableA
}
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
[WorkItem(209695, "https://devdiv.visualstudio.com/DevDiv/_workitems?id=209694")]
public void ExceptionInReadAllBytes()
{
......@@ -119,7 +118,7 @@ public void ExceptionInReadAllBytes()
Diagnostic(ErrorCode.ERR_PublicKeyFileFailure).WithArguments(keyFile, ex.Message).WithLocation(1, 1));
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void ExceptionInReadKeysFromContainer()
{
var ex = new Exception("Crazy exception you could never have predicted!");
......@@ -140,7 +139,7 @@ public void ExceptionInReadKeysFromContainer()
Diagnostic(ErrorCode.ERR_PublicKeyContainerFailure).WithArguments("RoslynTestContainer", ex.Message).WithLocation(1, 1));
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void BadInputStream()
{
string src = @"
......@@ -161,4 +160,3 @@ class C
}
}
}
#endif
......@@ -12766,7 +12766,7 @@ private void UnifyUnderlyingWithTuple_04_AssertCompilation(CSharpCompilation com
}
[ConditionalFact(typeof(DesktopOnly))]
public void UnifyUnderlyingWithTuple_05k()
public void UnifyUnderlyingWithTuple_05()
{
var source = @"
using System;
......@@ -21316,6 +21316,7 @@ public class ValueTuple<T1, T2, T3> : C<B>
Diagnostic(ErrorCode.ERR_NoTypeDef).WithArguments("A", "92872377-08d1-4723-8906-a43b03e56ed3, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"));
}
// https://github.com/dotnet/roslyn/issues/25141
#if NET461
[Fact]
public void ValueTupleBase_AssemblyUnification()
......
......@@ -18,7 +18,7 @@ public class PrivateProtected : CSharpTestBase
private static readonly string s_publicKeyFile = SigningTestHelpers.PublicKeyFile;
private static readonly ImmutableArray<byte> s_publicKey = SigningTestHelpers.PublicKey;
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void RejectIncompatibleModifiers()
{
string source =
......@@ -52,7 +52,7 @@ public void RejectIncompatibleModifiers()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void AccessibleWhereRequired_01()
{
string source =
......@@ -76,7 +76,7 @@ void M()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void AccessibleWhereRequired_02()
{
string source1 =
......@@ -246,7 +246,7 @@ void M()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void NotAccessibleWhereRequired()
{
string source =
......@@ -277,7 +277,7 @@ void M()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void NotInStructOrNamespace()
{
string source =
......@@ -297,7 +297,7 @@ public void NotInStructOrNamespace()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void NotInStaticClass()
{
string source =
......@@ -321,7 +321,7 @@ sealed class D
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void NestedTypes()
{
string source =
......@@ -366,7 +366,7 @@ private protected class Inner // error: protected not allowed in struct
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void PermittedAccessorProtection()
{
string source =
......@@ -383,7 +383,7 @@ public void PermittedAccessorProtection()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void ForbiddenAccessorProtection_01()
{
string source =
......@@ -403,7 +403,7 @@ public void ForbiddenAccessorProtection_01()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void ForbiddenAccessorProtection_02()
{
string source =
......@@ -419,7 +419,7 @@ public void ForbiddenAccessorProtection_02()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void AtLeastAsRestrictivePositive_01()
{
string source =
......@@ -445,7 +445,7 @@ private protected class Nested
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void AtLeastAsRestrictiveNegative_01()
{
string source =
......@@ -468,7 +468,7 @@ private protected class PrivateProtected {}
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void DuplicateAccessInBinder()
{
string source =
......@@ -522,7 +522,7 @@ private public interface I {} // 8
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void NotInVersion71()
{
string source =
......@@ -576,7 +576,7 @@ private protected interface I {} // 8
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void VerifyPrivateProtectedIL()
{
var text = @"
......@@ -596,7 +596,7 @@ class Program
});
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void VerifyPartialPartsMatch()
{
var source =
......@@ -622,7 +622,7 @@ private protected partial class Inner {}
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void VerifyProtectedSemantics()
{
var source =
......@@ -661,7 +661,7 @@ class Other : Base
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void HidingAbstract()
{
var source =
......@@ -678,7 +678,7 @@ abstract class B : A
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void HidingInaccessible()
{
string source1 =
......@@ -705,7 +705,7 @@ public void HidingInaccessible()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void UnimplementedInaccessible()
{
string source1 =
......@@ -731,7 +731,7 @@ public void UnimplementedInaccessible()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void ImplementInaccessible()
{
string source1 =
......@@ -761,7 +761,7 @@ public void ImplementInaccessible()
);
}
[Fact]
[ConditionalFact(typeof(DesktopOnly))]
public void VerifyPPExtension()
{
string source = @"
......
......@@ -11,7 +11,6 @@
using Microsoft.CodeAnalysis.CSharp.Test.Utilities;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Test.Utilities;
using Roslyn.Test.Utilities.Desktop;
using Roslyn.Utilities;
using Xunit;
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Immutable;
using Microsoft.CodeAnalysis.PooledObjects;
using Roslyn.Utilities;
......
......@@ -96,7 +96,8 @@ public int Execute(string moduleName, string[] args, string expectedOutput)
public ImmutableArray<byte> GetMainPdb() => GetEmitData().MainModulePdb;
public SortedSet<string> GetMemberSignaturesFromMetadata(string fullyQualifiedTypeName, string memberName) => GetEmitData().GetMemberSignaturesFromMetadata(fullyQualifiedTypeName, memberName);
public SortedSet<string> GetMemberSignaturesFromMetadata(string fullyQualifiedTypeName, string memberName) =>
GetEmitData().GetMemberSignaturesFromMetadata(fullyQualifiedTypeName, memberName);
public void Verify(Verification verification)
{
......
......@@ -542,9 +542,7 @@ static private void AppendFieldInfo(FieldInfo field, StringBuilder sb)
if (field.IsInitOnly) sb.Append("initonly ");
if (field.IsLiteral) sb.Append("literal ");
#if NET46 || NET461
if (field.IsNotSerialized) sb.Append("notserialized ");
#endif
if (field.Attributes.HasFlag(FieldAttributes.SpecialName)) sb.Append("specialname ");
if (field.Attributes.HasFlag(FieldAttributes.RTSpecialName)) sb.Append("rtspecialname ");
#if NET46 || NET461
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册