This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
169 additions
and
2 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
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,48 @@ | ||
<?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" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{E55A6F8B-B9E3-45CE-88F4-22AE70F606CB}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> | ||
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<ReferenceLocalMscorlib>false</ReferenceLocalMscorlib> | ||
<CLRTestKind>BuildAndRun</CLRTestKind> | ||
<CLRTestPriority>1</CLRTestPriority> | ||
</PropertyGroup> | ||
<!-- Default configurations to help VS understand the configurations --> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> | ||
<Visible>False</Visible> | ||
</CodeAnalysisDependentAssemblyPaths> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<!-- Add Compile Object Here --> | ||
<Compile Include="test7685.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="app.config" /> | ||
<None Include="project.json" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="../../../Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" /> | ||
</ItemGroup> | ||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> | ||
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> | ||
</PropertyGroup> | ||
</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,44 @@ | ||
{ | ||
"dependencies": { | ||
"Microsoft.NETCore.Platforms": "1.0.1-rc3-24117-00", | ||
"System.Collections": "4.0.10", | ||
"System.Collections.NonGeneric": "4.0.1-rc3-24117-00", | ||
"System.Collections.Specialized": "4.0.1-rc3-24117-00", | ||
"System.ComponentModel": "4.0.1-rc3-24117-00", | ||
"System.Console": "4.0.0-rc3-24117-00", | ||
"System.Diagnostics.Process": "4.1.0-rc3-24117-00", | ||
"System.Globalization": "4.0.10", | ||
"System.Globalization.Calendars": "4.0.0", | ||
"System.IO": "4.0.10", | ||
"System.IO.FileSystem": "4.0.1-rc3-24117-00", | ||
"System.IO.FileSystem.Primitives": "4.0.0", | ||
"System.Linq": "4.1.0-rc3-24117-00", | ||
"System.Linq.Queryable": "4.0.1-rc3-24117-00", | ||
"System.Reflection": "4.1.0-rc3-24117-00", | ||
"System.Reflection.Primitives": "4.0.0", | ||
"System.Runtime": "4.1.0-rc3-24117-00", | ||
"System.Runtime.Extensions": "4.0.10", | ||
"System.Runtime.Handles": "4.0.0", | ||
"System.Runtime.InteropServices": "4.1.0-rc3-24117-00", | ||
"System.Runtime.Loader": "4.0.0-rc3-24117-00", | ||
"System.Text.Encoding": "4.0.10", | ||
"System.Threading": "4.0.10", | ||
"System.Threading.Thread": "4.0.0-rc3-24117-00", | ||
"System.Xml.ReaderWriter": "4.0.11-rc3-24117-00", | ||
"System.Xml.XDocument": "4.0.11-rc3-24117-00", | ||
"System.Xml.XmlDocument": "4.0.1-rc3-24117-00", | ||
"System.Xml.XmlSerializer": "4.0.11-rc3-24117-00" | ||
}, | ||
"frameworks": { | ||
"dnxcore50": {} | ||
}, | ||
"runtimes": { | ||
"win7-x86": {}, | ||
"win7-x64": {}, | ||
"ubuntu.14.04-x64": {}, | ||
"osx.10.10-x64": {}, | ||
"centos.7-x64": {}, | ||
"rhel.7-x64": {}, | ||
"debian.8-x64": {} | ||
} | ||
} |
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,48 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
using System; | ||
using System.Reflection; | ||
|
||
public class Test7685 | ||
{ | ||
static RectangleF argumentInDStuff; | ||
|
||
public static int Main() | ||
{ | ||
int iRetVal = 100; | ||
|
||
var r = new RectangleF(1.2f, 3.4f, 5.6f, 7.8f); | ||
typeof(Test7685).GetTypeInfo().GetDeclaredMethod("DoStuff").Invoke(null, new object[] { r }); | ||
|
||
if (!RectangleF.Equals(ref argumentInDStuff, ref r)) | ||
{ | ||
TestLibrary.Logging.WriteLine($"Error: passing struct with floats via reflection. Callee received {argumentInDStuff} instead of {r}"); | ||
iRetVal = 0; | ||
} | ||
|
||
return iRetVal; | ||
} | ||
|
||
public static void DoStuff(RectangleF r) | ||
{ | ||
argumentInDStuff = r; | ||
} | ||
} | ||
|
||
public struct RectangleF | ||
{ | ||
private float _x, _y, _width, _height; | ||
|
||
public RectangleF(float x, float y, float width, float height) | ||
{ | ||
_x = x; _y = y; _width = width; _height = height; | ||
} | ||
|
||
public static bool Equals(ref RectangleF r1, ref RectangleF r2) | ||
{ | ||
return (r2._x == r1._x) && (r2._y == r1._y) && (r2._width == r1._width) && (r2._height == r1._height); | ||
} | ||
|
||
public override string ToString() => $"[{_x}, {_y}, {_width}, {_height}]"; | ||
} |