-
Notifications
You must be signed in to change notification settings - Fork 568
[TrimmableTypeMap] Integration parity tests #10827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
simonrozsival
wants to merge
3
commits into
dotnet:main
Choose a base branch
from
simonrozsival:dev/simonrozsival/ttm-slice-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
56 changes: 56 additions & 0 deletions
56
...leTypeMap.IntegrationTests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests.csproj
This file contains hidden or 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,56 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>$(DotNetTargetFramework)</TargetFramework> | ||
| <LangVersion>latest</LangVersion> | ||
| <Nullable>enable</Nullable> | ||
| <IsPackable>false</IsPackable> | ||
| <RootNamespace>Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests</RootNamespace> | ||
| <SignAssembly>true</SignAssembly> | ||
| <AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile> | ||
| <OutputPath>..\..\bin\Test$(Configuration)</OutputPath> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="xunit" Version="2.9.3" /> | ||
| <PackageReference Include="xunit.runner.visualstudio" Version="3.0.2" /> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- Exclude the fixture assembly source files from this project --> | ||
| <ItemGroup> | ||
| <Compile Remove="UserTypesFixture\**" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\src\Microsoft.Android.Sdk.TrimmableTypeMap\Microsoft.Android.Sdk.TrimmableTypeMap.csproj" /> | ||
| <ProjectReference Include="..\..\src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj" /> | ||
| <!-- Mono.Android is built as a dependency so the ref assembly is available on disk. | ||
| ReferenceOutputAssembly=false because we read it with SRM/Cecil, not compile against it directly. | ||
| Instead, we reference the ref assembly below so we can use typeof(Java.Lang.Object). --> | ||
| <ProjectReference Include="..\..\src\Mono.Android\Mono.Android.csproj" | ||
| ReferenceOutputAssembly="false" /> | ||
| <!-- User-type fixture assembly: built as a dependency, scanned via SRM/Cecil in tests. | ||
| ReferenceOutputAssembly=false because we don't compile against it — we just need the DLL on disk. --> | ||
| <ProjectReference Include="UserTypesFixture\UserTypesFixture.csproj" | ||
| ReferenceOutputAssembly="false" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- Discover the Mono.Android ref assembly path and add a direct Reference to it. | ||
| This lets tests use typeof(Java.Lang.Object).Assembly.Location to find the assembly. --> | ||
| <Target Name="_AddMonoAndroidReference" BeforeTargets="ResolveAssemblyReferences"> | ||
| <ItemGroup> | ||
| <_MonoAndroidRefCandidate Include="$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)\lib\packs\Microsoft.Android.Ref.*\*\ref\net*\Mono.Android.dll" /> | ||
| </ItemGroup> | ||
| <PropertyGroup> | ||
| <_MonoAndroidRefAssembly>@(_MonoAndroidRefCandidate, ';')</_MonoAndroidRefAssembly> | ||
| <_MonoAndroidRefAssembly>$(_MonoAndroidRefAssembly.Split(';')[0])</_MonoAndroidRefAssembly> | ||
| </PropertyGroup> | ||
| <ItemGroup Condition=" '$(_MonoAndroidRefAssembly)' != '' "> | ||
| <Reference Include="Mono.Android"> | ||
| <HintPath>$(_MonoAndroidRefAssembly)</HintPath> | ||
| </Reference> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| </Project> |
22 changes: 22 additions & 0 deletions
22
tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/MockBuildEngine.cs
This file contains hidden or 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,22 @@ | ||
| using System; | ||
| using System.Collections; | ||
| using Microsoft.Build.Framework; | ||
|
|
||
| namespace Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests; | ||
|
|
||
| /// <summary> | ||
| /// Minimal IBuildEngine implementation for use with TaskLoggingHelper in tests. | ||
| /// </summary> | ||
| sealed class MockBuildEngine : IBuildEngine | ||
| { | ||
| public bool ContinueOnError => false; | ||
| public int LineNumberOfTaskNode => 0; | ||
| public int ColumnNumberOfTaskNode => 0; | ||
| public string ProjectFileOfTaskNode => ""; | ||
|
|
||
| public bool BuildProjectFile (string projectFileName, string [] targetNames, IDictionary globalProperties, IDictionary targetOutputs) => true; | ||
| public void LogCustomEvent (CustomBuildEventArgs e) { } | ||
| public void LogErrorEvent (BuildErrorEventArgs e) { } | ||
| public void LogMessageEvent (BuildMessageEventArgs e) { } | ||
| public void LogWarningEvent (BuildWarningEventArgs e) { } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.