Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2017-07-03 17:59:12 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2017-07-03 18:29:32 +0300
commit7e70a4e9236104c350e7d9ca3505225755065569 (patch)
treeac2d3c9604216d770200d4370f2613182bcd5312 /src/System.Numerics.Vectors
parente9e1fb251df4be19b142f0cef2c7dcc13b84f2f2 (diff)
parent4bf51c870ec075d89c809ea1dd7449d609187b7a (diff)
Merge remote-tracking branch 'upstream/master'
# Conflicts: # src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.cs # src/System.Drawing.Common/src/System/Drawing/Printing/Margins.cs # src/System.Drawing.Common/src/System/Drawing/SystemBrushes.cs # src/System.Drawing.Primitives/src/System/Drawing/SizeF.cs # src/System.Net.WebHeaderCollection/tests/WebHeaderCollectionTest.cs # src/System.Runtime.CompilerServices.VisualC/src/System/Runtime/CompilerServices/Attributes.cs
Diffstat (limited to 'src/System.Numerics.Vectors')
-rw-r--r--src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj10
-rw-r--r--src/System.Numerics.Vectors/tests/GenericVectorTests.cs4
-rw-r--r--src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj5
-rw-r--r--src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj3
-rw-r--r--src/System.Numerics.Vectors/tests/Vector2Tests.cs13
-rw-r--r--src/System.Numerics.Vectors/tests/Vector3Tests.cs2
-rw-r--r--src/System.Numerics.Vectors/tests/Vector4Tests.cs2
7 files changed, 21 insertions, 18 deletions
diff --git a/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj b/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj
index 80c11ac05e..437be1c4e8 100644
--- a/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj
+++ b/src/System.Numerics.Vectors/src/System.Numerics.Vectors.csproj
@@ -9,16 +9,6 @@
<IsPartialFacadeAssembly Condition="'$(TargetGroup)'=='netfx' OR '$(TargetGroup)'=='net46'">true</IsPartialFacadeAssembly>
<PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard1.0'">netstandard1.0;portable-net45+win8+wp8+wpa81</PackageTargetFramework>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.0'">
- <!-- Use the documentation file generated by this project for the reference assembly.
- This needs to be kept in sync with all of the PackageTargetFrameworks used by
- the reference assembly projects. -->
- <FilesToPackage Include="$(DocumentationFile)">
- <TargetPath>ref/netstandard1.0</TargetPath>
- <IsReferenceAsset>true</IsReferenceAsset>
- </FilesToPackage>
- </ItemGroup>
- <!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
diff --git a/src/System.Numerics.Vectors/tests/GenericVectorTests.cs b/src/System.Numerics.Vectors/tests/GenericVectorTests.cs
index 237b963749..88e11b93e4 100644
--- a/src/System.Numerics.Vectors/tests/GenericVectorTests.cs
+++ b/src/System.Numerics.Vectors/tests/GenericVectorTests.cs
@@ -310,7 +310,7 @@ namespace System.Numerics.Tests
Assert.Throws<NullReferenceException>(() => vector.CopyTo(null, 0));
Assert.Throws<ArgumentOutOfRangeException>(() => vector.CopyTo(array, -1));
Assert.Throws<ArgumentOutOfRangeException>(() => vector.CopyTo(array, array.Length));
- Assert.Throws<ArgumentException>(() => vector.CopyTo(array, array.Length - 1));
+ AssertExtensions.Throws<ArgumentException>(null, () => vector.CopyTo(array, array.Length - 1));
vector.CopyTo(array);
for (int g = 0; g < array.Length; g++)
@@ -2695,4 +2695,4 @@ namespace System.Numerics.Tests
}
#endregion
}
-} \ No newline at end of file
+}
diff --git a/src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj b/src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj
index 4a8c3cd9e0..2659735725 100644
--- a/src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj
+++ b/src/System.Numerics.Vectors/tests/Performance/System.Numerics.Vectors.Performance.Tests.csproj
@@ -6,11 +6,12 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludePerformanceTests>true</IncludePerformanceTests>
<ProjectGuid>{D9906F1A-A41A-43CD-81D2-BA94CF0001C9}</ProjectGuid>
+ <DisableTests Condition="'$(TargetGroup)' == 'uap' AND ('$(ArchGroup)' == 'arm' OR '$(ArchGroup)' == 'arm64')">true</DisableTests>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
- <ItemGroup>
+ <ItemGroup Condition="'$(DisableTests)' != 'true'">
<Compile Include="Vector2\Distance.cs" />
<Compile Include="Vector2\GetHashCode.cs" />
<Compile Include="Vector2\Length.cs" />
@@ -56,7 +57,7 @@
<Compile Include="Vector2\AddOperator.cs" />
<Compile Include="VectorTests.cs" />
</ItemGroup>
- <ItemGroup>
+ <ItemGroup Condition="'$(DisableTests)' != 'true'">
<ProjectReference Include="$(CommonPath)\..\perf\PerfRunner\PerfRunner.csproj">
<Project>{69e46a6f-9966-45a5-8945-2559fe337827}</Project>
<Name>PerfRunner</Name>
diff --git a/src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj b/src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj
index e623866e58..6a6d6ac63a 100644
--- a/src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj
+++ b/src/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj
@@ -32,6 +32,9 @@
<Compile Include="Matrix4x4Tests.cs" />
<Compile Include="PlaneTests.cs" />
<Compile Include="QuaternionTests.cs" />
+ <Compile Include="$(CommonTestPath)\System\AssertExtensions.cs">
+ <Link>Common\System\AssertExtensions.cs</Link>
+ </Compile>
<Compile Include="$(CommonTestPath)\System\PlatformDetection.cs">
<Link>Common\System\PlatformDetection.cs</Link>
</Compile>
diff --git a/src/System.Numerics.Vectors/tests/Vector2Tests.cs b/src/System.Numerics.Vectors/tests/Vector2Tests.cs
index 6c61e024c1..62301d6f9c 100644
--- a/src/System.Numerics.Vectors/tests/Vector2Tests.cs
+++ b/src/System.Numerics.Vectors/tests/Vector2Tests.cs
@@ -18,7 +18,6 @@ namespace System.Numerics.Tests
}
[Fact]
- [ActiveIssue("TFS 444567 - Codegen optimization issue", TargetFrameworkMonikers.UapAot)]
public void Vector2CopyToTest()
{
Vector2 v1 = new Vector2(2.0f, 3.0f);
@@ -29,7 +28,17 @@ namespace System.Numerics.Tests
Assert.Throws<NullReferenceException>(() => v1.CopyTo(null, 0));
Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, -1));
Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, a.Length));
- Assert.Throws<ArgumentException>(() => v1.CopyTo(a, 2));
+
+ if (!PlatformDetection.IsNetNative)
+ {
+ AssertExtensions.Throws<ArgumentException>(null, () => v1.CopyTo(a, 2));
+ }
+ else
+ {
+ // The .Net Native code generation optimizer does aggressive optimizations to range checks
+ // which result in an ArgumentOutOfRangeException exception being thrown at runtime.
+ Assert.ThrowsAny<ArgumentException>(() => v1.CopyTo(a, 2));
+ }
v1.CopyTo(a, 1);
v1.CopyTo(b);
diff --git a/src/System.Numerics.Vectors/tests/Vector3Tests.cs b/src/System.Numerics.Vectors/tests/Vector3Tests.cs
index e8e072db0d..fc40099139 100644
--- a/src/System.Numerics.Vectors/tests/Vector3Tests.cs
+++ b/src/System.Numerics.Vectors/tests/Vector3Tests.cs
@@ -28,7 +28,7 @@ namespace System.Numerics.Tests
Assert.Throws<NullReferenceException>(() => v1.CopyTo(null, 0));
Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, -1));
Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, a.Length));
- Assert.Throws<ArgumentException>(() => v1.CopyTo(a, a.Length - 2));
+ AssertExtensions.Throws<ArgumentException>(null, () => v1.CopyTo(a, a.Length - 2));
v1.CopyTo(a, 1);
v1.CopyTo(b);
diff --git a/src/System.Numerics.Vectors/tests/Vector4Tests.cs b/src/System.Numerics.Vectors/tests/Vector4Tests.cs
index 11f8b8313b..7149a2fb48 100644
--- a/src/System.Numerics.Vectors/tests/Vector4Tests.cs
+++ b/src/System.Numerics.Vectors/tests/Vector4Tests.cs
@@ -28,7 +28,7 @@ namespace System.Numerics.Tests
Assert.Throws<NullReferenceException>(() => v1.CopyTo(null, 0));
Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, -1));
Assert.Throws<ArgumentOutOfRangeException>(() => v1.CopyTo(a, a.Length));
- Assert.Throws<ArgumentException>(() => v1.CopyTo(a, a.Length - 2));
+ AssertExtensions.Throws<ArgumentException>(null, () => v1.CopyTo(a, a.Length - 2));
v1.CopyTo(a, 1);
v1.CopyTo(b);