提交 5c8f89aa 编写于 作者: S sepidehMS

Fix System.Xml.XDocument configuration and have its new API tests run only on netcoreapp1.1


Commit migrated from https://github.com/dotnet/corefx/commit/8de1f50345d369a7fc18f0459361563fa356721b
上级 955e5f76
......@@ -13,8 +13,16 @@
<TestTFMs>netcore50;net46</TestTFMs>
</Project>
<Project Include="misc\System.Xml.Linq.Misc.Tests.csproj" />
<Project Include="misc\System.Xml.Linq.Misc.Tests.csproj">
<TargetGroup>netcoreapp1.1</TargetGroup>
</Project>
<Project Include="misc\System.Xml.Linq.Misc.Tests.csproj">
<OSGroup>Windows_NT</OSGroup>
<TestTFMs>net463</TestTFMs>
</Project>
<Project Include="misc\System.Xml.Linq.Misc.Tests.csproj">
<OSGroup>Windows_NT</OSGroup>
<TargetGroup>netstandard1.3</TargetGroup>
<TestTFMs>netcore50;net46</TestTFMs>
</Project>
<Project Include="Properties\System.Xml.Linq.Properties.Tests.csproj" />
......@@ -35,6 +43,7 @@
<Project Include="TreeManipulation\System.Xml.Linq.TreeManipulation.Tests.csproj" />
<Project Include="TreeManipulation\System.Xml.Linq.TreeManipulation.Tests.csproj">
<OSGroup>Windows_NT</OSGroup>
<TargetGroup>netstandard1.3</TargetGroup>
<TestTFMs>netcore50;net46</TestTFMs>
</Project>
<Project Include="XDocument.Common\XDocument.Common.csproj" />
......
......@@ -16,7 +16,6 @@ namespace CoreXml.Test.XLinq
{
public class LoadSaveAsyncTests : BridgeHelpers
{
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async methods defined only on Core")]
[Fact]
public static void ArgumentValidation()
{
......@@ -27,7 +26,6 @@ public static void ArgumentValidation()
Assert.Throws<ArgumentNullException>(() => { new XElement("Name").SaveAsync((XmlWriter)null, CancellationToken.None); });
}
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async methods defined only on Core")]
[Fact]
public static async Task AlreadyCanceled()
{
......@@ -50,7 +48,6 @@ public static async Task AlreadyCanceled()
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => new XElement("Name").SaveAsync(XmlWriter.Create(Stream.Null), new CancellationToken(true)));
}
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async methods defined only on Core")]
[Theory]
[MemberData("RoundtripOptions_MemberData")]
public static async Task RoundtripSyncAsyncMatches_XmlReader(bool document, LoadOptions loadOptions, SaveOptions saveOptions)
......@@ -108,7 +105,6 @@ public static async Task RoundtripSyncAsyncMatches_XmlReader(bool document, Load
Assert.Equal(syncOutput.ToArray(), asyncOutput.ToArray());
}
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async methods defined only on Core")]
[Theory]
[MemberData("RoundtripOptions_MemberData")]
public static async Task RoundtripSyncAsyncMatches_StreamReader(bool document, LoadOptions loadOptions, SaveOptions saveOptions)
......@@ -151,7 +147,6 @@ public static async Task RoundtripSyncAsyncMatches_StreamReader(bool document, L
Assert.Equal(syncOutput.ToArray(), asyncOutput.ToArray());
}
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Async methods defined only on Core")]
[Theory]
[MemberData("RoundtripOptions_MemberData")]
public static async Task RoundtripSyncAsyncMatches_Stream(bool document, LoadOptions loadOptions, SaveOptions saveOptions)
......
......@@ -23,7 +23,7 @@
<Compile Include="XHashtable.cs" />
<Compile Include="XLinqErrata4.cs" />
<Compile Include="XNameAPI.cs" />
<Compile Include="LoadSaveAsyncTests.cs" Condition="'$(TargetGroup)'==''" />
<Compile Include="LoadSaveAsyncTests.cs" Condition="'$(TargetGroup)'=='netcoreapp1.1'" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(CommonTestPath)\System\Xml\ModuleCore\ModuleCore.csproj" />
......
Compat issues with assembly System.Xml.XDocument:
MembersMustExist : Member 'System.Xml.Linq.XCData.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XComment.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XDocument.LoadAsync(System.IO.Stream, System.Xml.Linq.LoadOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XDocument.LoadAsync(System.IO.TextReader, System.Xml.Linq.LoadOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XDocument.LoadAsync(System.Xml.XmlReader, System.Xml.Linq.LoadOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XDocument.SaveAsync(System.IO.Stream, System.Xml.Linq.SaveOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XDocument.SaveAsync(System.IO.TextWriter, System.Xml.Linq.SaveOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XDocument.SaveAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XDocument.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XDocumentType.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XElement.LoadAsync(System.IO.Stream, System.Xml.Linq.LoadOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XElement.LoadAsync(System.IO.TextReader, System.Xml.Linq.LoadOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XElement.LoadAsync(System.Xml.XmlReader, System.Xml.Linq.LoadOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XElement.SaveAsync(System.IO.Stream, System.Xml.Linq.SaveOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XElement.SaveAsync(System.IO.TextWriter, System.Xml.Linq.SaveOptions, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XElement.SaveAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XElement.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XNode.ReadFromAsync(System.Xml.XmlReader, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XNode.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XProcessingInstruction.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XText.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
Total Issues: 21
\ No newline at end of file
......@@ -14,6 +14,11 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net463_Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net463_Release|AnyCPU'" />
<ItemGroup Condition="'$(TargetGroup)' == 'net463'">
<ContractProject Include="..\ref\System.Xml.XDocument.csproj">
<TargetGroup>netstandard1.7</TargetGroup>
</ContractProject>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'net463'">
<ProjectReference Include="..\..\System.Private.Xml.Linq\src\System.Private.Xml.Linq.csproj" />
<ProjectReference Include="..\..\System.Private.Xml\src\System.Private.Xml.csproj">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册