Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 3d43ccf

Browse files
committed
Add unloading test for IUnknownTest
1 parent 4d00236 commit 3d43ccf

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

tests/src/Interop/MarshalAPI/IUnknown/IUnknownTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</CodeAnalysisDependentAssemblyPaths>
2929
</ItemGroup>
3030
<ItemGroup>
31-
<Compile Include="*.cs" />
31+
<Compile Include="IUnknownTest.cs" />
3232
</ItemGroup>
3333
<ItemGroup>
3434
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<AssemblyName>IUnknownTestInALC</AssemblyName>
8+
<SchemaVersion>2.0</SchemaVersion>
9+
<ProjectGuid>{F1E66554-8C8E-4141-85CF-D0CD6A0CD0B0}</ProjectGuid>
10+
<OutputType>Exe</OutputType>
11+
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
12+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
13+
14+
<DefineConstants>$(DefineConstants);STATIC</DefineConstants>
15+
16+
<!-- Test unsupported outside of windows -->
17+
<TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows>
18+
<DisableProjectBuild Condition="'$(TargetsUnix)' == 'true'">true</DisableProjectBuild>
19+
</PropertyGroup>
20+
<!-- Default configurations to help VS understand the configurations -->
21+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
22+
</PropertyGroup>
23+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
24+
</PropertyGroup>
25+
<ItemGroup>
26+
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
27+
<Visible>False</Visible>
28+
</CodeAnalysisDependentAssemblyPaths>
29+
</ItemGroup>
30+
<ItemGroup>
31+
<Compile Include="TestInALC.cs" />
32+
</ItemGroup>
33+
<ItemGroup>
34+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
35+
</ItemGroup>
36+
<ItemGroup>
37+
<ProjectReference Include="..\..\..\Common\CoreCLRTestLibrary\CoreCLRTestLibrary.csproj">
38+
<Project>{c8c0dc74-fac4-45b1-81fe-70c4808366e0}</Project>
39+
<Name>CoreCLRTestLibrary</Name>
40+
</ProjectReference>
41+
<ProjectReference Include="IUnknownTest.csproj" />
42+
<ProjectReference Include="CMakeLists.txt" />
43+
</ItemGroup>
44+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
45+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
using System;
5+
using System.IO;
6+
using System.Reflection;
7+
8+
namespace TestInALC
9+
{
10+
class Test
11+
{
12+
static int Main(string[] args)
13+
{
14+
string currentAssemblyDirectory = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath);
15+
string testAssemblyFullPath = Path.Combine(currentAssemblyDirectory, "IUnknownTest.exe");
16+
return TestLibrary.Utilities.ExecuteAndUnload(testAssemblyFullPath, args);
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)