зеркало из https://github.com/App-vNext/corefx.git
Merge branch 'fix-mdreader-tests' of https://github.com/nguerrera/corefx
This commit is contained in:
Коммит
518e13ebad
|
@ -1,4 +1,3 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.30324.0
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.30110.0
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Reflection.Metadata.Tests.Metadata
|
||||
{
|
||||
public class HandleCollectionTests
|
||||
{
|
||||
[Fact(Skip = "subject to design change")]
|
||||
public void CollectionsCreatedFromDefaultDefinitionsThrow()
|
||||
{
|
||||
Assert.Throws<InvalidOperationException>(() => default(MethodDefinition).GetCustomAttributes());
|
||||
Assert.Throws<InvalidOperationException>(() => default(TypeDefinition).GetMethods());
|
||||
Assert.Throws<InvalidOperationException>(() => default(TypeDefinition).GetFields());
|
||||
Assert.Throws<InvalidOperationException>(() => default(TypeDefinition).GetProperties());
|
||||
Assert.Throws<InvalidOperationException>(() => default(TypeDefinition).GetEvents());
|
||||
Assert.Throws<InvalidOperationException>(() => default(AssemblyDefinition).GetDeclarativeSecurityAttributes());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Work around known Dev14 bug - see
|
||||
https://connect.microsoft.com/VisualStudio/feedback/details/1000796/connect-file-uap-props-not-found-cant-build-a-portable-lib-on-vs14
|
||||
-->
|
||||
|
||||
-->
|
||||
<_WindowsKitBinPath>C:\Program Files (x86)\Windows Kits\8.1\bin\x86</_WindowsKitBinPath>
|
||||
<_WindowsPhoneKitBinPath>C:\Program Files (x86)\Windows Phone Kits\8.1\bin</_WindowsPhoneKitBinPath>
|
||||
<MakePriExeFullPath>$(_WindowsKitBinPath)\makepri.exe</MakePriExeFullPath>
|
||||
|
@ -15,7 +13,6 @@
|
|||
<MakePriExtensionPath>$(_WindowsPhoneKitBinPath)\x86\MrmEnvironmentExtDl.dll</MakePriExtensionPath>
|
||||
<MakePriExtensionPath_x64>$(_WindowsPhoneKitBinPath)\x64\MrmEnvironmentExtDl.dll</MakePriExtensionPath_x64>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
<Platform Condition="'$(Platform)' == ''">AnyCPU</Platform>
|
||||
|
@ -72,7 +69,6 @@
|
|||
<Compile Include="Metadata\ClassLayoutRow.cs" />
|
||||
<Compile Include="Metadata\Ecma335\MetadataAggregatorTests.cs" />
|
||||
<Compile Include="Metadata\Ecma335\MetadataTokensTests.cs" />
|
||||
<Compile Include="Metadata\HandleCollectionTests.cs" />
|
||||
<Compile Include="Metadata\HandleComparerTests.cs" />
|
||||
<Compile Include="Metadata\HandleTests.cs" />
|
||||
<Compile Include="Metadata\MetadataReaderTestHelpers.cs" />
|
||||
|
|
|
@ -234,8 +234,9 @@ namespace System.Reflection.Metadata.Tests
|
|||
}
|
||||
}
|
||||
|
||||
// Add more test cases when fixing this.
|
||||
[Fact(Skip = "TODO: MetadataStringComparer needs to use the user-supplied encoding.")]
|
||||
// TODO: Issue #26: MetadataStringComparer needs to use the user-supplied encoding.
|
||||
// Add more test cases when fixing this and re-enabling the test.
|
||||
/*[Fact]*/
|
||||
public unsafe void ComparisonToInvalidByteSequenceMatchesFallback()
|
||||
{
|
||||
// dangling lead byte
|
||||
|
@ -248,7 +249,7 @@ namespace System.Reflection.Metadata.Tests
|
|||
Assert.False(new MemoryBlock(ptr, buffer.Length).Utf8NullTerminatedEquals(0, Encoding.UTF8.GetString(buffer)));
|
||||
}
|
||||
|
||||
// overload encoding
|
||||
// overlong encoding
|
||||
fixed (byte* ptr = (buffer = new byte[] { (byte)'a', 0xC0, 0xAF, (byte)'b', 0x0 }))
|
||||
{
|
||||
var block = new MemoryBlock(ptr, buffer.Length);
|
||||
|
|
Загрузка…
Ссылка в новой задаче