forked from dotnet/coreclr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Methodical/NaN test cases for JIT.
Add Methodical/NaN test cases for JIT. Related proj, config, and sln files added and updated. Passed build, buildtest, runtest. Also added Generic/Exceptions, Methodical/MDArray/DataTypes, Directed/StructPromote tests to AllTestProject.sln.
- Loading branch information
Bengu Li
committed
May 8, 2015
1 parent
411577b
commit c9d4a03
Showing
17 changed files
with
11,419 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> | ||
<!-- Default configurations to help VS understand the configurations --> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> | ||
</PropertyGroup> | ||
<Target Name="Build"> | ||
<ItemGroup> | ||
<AllSourceFiles Include="$(MSBuildProjectDirectory)\*.cs" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<GenerateRunScript>false</GenerateRunScript> | ||
</PropertyGroup> | ||
<MSBuild Projects="cs_template.proj" Properties="AssemblyName1=%(AllSourceFiles.FileName);AllowUnsafeBlocks=True;IntermediateOutputPath=$(IntermediateOutputPath)\%(AllSourceFiles.FileName)\" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// | ||
|
||
namespace JitTest | ||
{ | ||
using System; | ||
|
||
class Test | ||
{ | ||
static void RunTests(float nan, float plusinf, float minusinf) | ||
{ | ||
if (!Single.IsNaN(nan + nan)) | ||
throw new Exception("! Single.IsNaN(nan + nan)"); | ||
if (!Single.IsNaN(nan + plusinf)) | ||
throw new Exception("! Single.IsNaN(nan + plusinf)"); | ||
if (!Single.IsNaN(nan + minusinf)) | ||
throw new Exception("! Single.IsNaN(nan + minusinf)"); | ||
if (!Single.IsNaN(plusinf + nan)) | ||
throw new Exception("! Single.IsNaN(plusinf + nan)"); | ||
if (!Single.IsPositiveInfinity(plusinf + plusinf)) | ||
throw new Exception("! Single.IsPositiveInfinity(plusinf + plusinf)"); | ||
if (!Single.IsNaN(plusinf + minusinf)) | ||
throw new Exception("! Single.IsNaN(plusinf + minusinf)"); | ||
if (!Single.IsNaN(minusinf + nan)) | ||
throw new Exception("! Single.IsNaN(minusinf + nan)"); | ||
if (!Single.IsNaN(minusinf + plusinf)) | ||
throw new Exception("! Single.IsNaN(minusinf + plusinf)"); | ||
if (!Single.IsNegativeInfinity(minusinf + minusinf)) | ||
throw new Exception("! Single.IsNegativeInfinity(minusinf + minusinf)"); | ||
if (!Single.IsNaN(nan + nan)) | ||
throw new Exception("! Single.IsNaN(nan + nan)"); | ||
if (!Single.IsNaN(nan + plusinf)) | ||
throw new Exception("! Single.IsNaN(nan + plusinf)"); | ||
if (!Single.IsNaN(nan + minusinf)) | ||
throw new Exception("! Single.IsNaN(nan + minusinf)"); | ||
if (!Single.IsNaN(plusinf + nan)) | ||
throw new Exception("! Single.IsNaN(plusinf + nan)"); | ||
if (!Single.IsPositiveInfinity(plusinf + plusinf)) | ||
throw new Exception("! Single.IsPositiveInfinity(plusinf + plusinf)"); | ||
if (!Single.IsNaN(plusinf + minusinf)) | ||
throw new Exception("! Single.IsNaN(plusinf + minusinf)"); | ||
if (!Single.IsNaN(minusinf + nan)) | ||
throw new Exception("! Single.IsNaN(minusinf + nan)"); | ||
if (!Single.IsNaN(minusinf + plusinf)) | ||
throw new Exception("! Single.IsNaN(minusinf + plusinf)"); | ||
if (!Single.IsNegativeInfinity(minusinf + minusinf)) | ||
throw new Exception("! Single.IsNegativeInfinity(minusinf + minusinf)"); | ||
if (!Single.IsNaN(nan + nan)) | ||
throw new Exception("! Single.IsNaN(nan + nan)"); | ||
if (!Single.IsNaN(nan + plusinf)) | ||
throw new Exception("! Single.IsNaN(nan + plusinf)"); | ||
if (!Single.IsNaN(nan + minusinf)) | ||
throw new Exception("! Single.IsNaN(nan + minusinf)"); | ||
if (!Single.IsNaN(plusinf + nan)) | ||
throw new Exception("! Single.IsNaN(plusinf + nan)"); | ||
if (!Single.IsPositiveInfinity(plusinf + plusinf)) | ||
throw new Exception("! Single.IsPositiveInfinity(plusinf + plusinf)"); | ||
if (!Single.IsNaN(plusinf + minusinf)) | ||
throw new Exception("! Single.IsNaN(plusinf + minusinf)"); | ||
if (!Single.IsNaN(minusinf + nan)) | ||
throw new Exception("! Single.IsNaN(minusinf + nan)"); | ||
if (!Single.IsNaN(minusinf + plusinf)) | ||
throw new Exception("! Single.IsNaN(minusinf + plusinf)"); | ||
if (!Single.IsNegativeInfinity(minusinf + minusinf)) | ||
throw new Exception("! Single.IsNegativeInfinity(minusinf + minusinf)"); | ||
if (!Single.IsNaN(nan + nan)) | ||
throw new Exception("! Single.IsNaN(nan + nan)"); | ||
if (!Single.IsNaN(nan + plusinf)) | ||
throw new Exception("! Single.IsNaN(nan + plusinf)"); | ||
if (!Single.IsNaN(nan + minusinf)) | ||
throw new Exception("! Single.IsNaN(nan + minusinf)"); | ||
if (!Single.IsNaN(plusinf + nan)) | ||
throw new Exception("! Single.IsNaN(plusinf + nan)"); | ||
if (!Single.IsPositiveInfinity(plusinf + plusinf)) | ||
throw new Exception("! Single.IsPositiveInfinity(plusinf + plusinf)"); | ||
if (!Single.IsNaN(plusinf + minusinf)) | ||
throw new Exception("! Single.IsNaN(plusinf + minusinf)"); | ||
if (!Single.IsNaN(minusinf + nan)) | ||
throw new Exception("! Single.IsNaN(minusinf + nan)"); | ||
if (!Single.IsNaN(minusinf + plusinf)) | ||
throw new Exception("! Single.IsNaN(minusinf + plusinf)"); | ||
if (!Single.IsNegativeInfinity(minusinf + minusinf)) | ||
throw new Exception("! Single.IsNegativeInfinity(minusinf + minusinf)"); | ||
} | ||
|
||
static int Main() | ||
{ | ||
RunTests(Single.NaN, Single.PositiveInfinity, Single.NegativeInfinity); | ||
Console.WriteLine("=== PASSED ==="); | ||
return 100; | ||
} | ||
} | ||
} |
Oops, something went wrong.