зеркало из https://github.com/dotnet/razor.git
Move all "shared" test files to "src\Shared\files\"
This commit is contained in:
Родитель
43f4c54d87
Коммит
ca5d6899af
|
@ -29,6 +29,7 @@
|
||||||
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
|
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
|
||||||
|
|
||||||
<SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\</SharedSourceRoot>
|
<SharedSourceRoot>$(MSBuildThisFileDirectory)src\Shared\</SharedSourceRoot>
|
||||||
|
<SharedFilesRoot>$(SharedSourceRoot)files\</SharedFilesRoot>
|
||||||
|
|
||||||
<!-- Embed source files that are not tracked by the source control manager in the PDB. -->
|
<!-- Embed source files that are not tracked by the source control manager in the PDB. -->
|
||||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||||
|
@ -91,7 +92,7 @@
|
||||||
the same type that is included in Microsoft.CodeAnalysis.ExternalAccess.Razor, which allows InternalsVisibleTo access
|
the same type that is included in Microsoft.CodeAnalysis.ExternalAccess.Razor, which allows InternalsVisibleTo access
|
||||||
to Razor tooling.
|
to Razor tooling.
|
||||||
-->
|
-->
|
||||||
<Compile Condition="'$(SkipLanguageSupport)' != 'true'" Include="$(MSBuildThisFileDirectory)\src\Shared\LanguageSupport\IsExternalInit.cs" Link="LanguageSupport\IsExternalInit.cs" />
|
<Compile Condition="'$(SkipLanguageSupport)' != 'true'" Include="$(SharedFilesRoot)LanguageSupport\IsExternalInit.cs" Link="LanguageSupport\IsExternalInit.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Package and Assembly Metadata">
|
<PropertyGroup Label="Package and Assembly Metadata">
|
||||||
|
|
|
@ -18,14 +18,9 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="MSN.cshtml" CopyToOutputDirectory="PreserveNewest" />
|
<None Include="$(SharedFilesRoot)Compiler\MSN.cshtml" CopyToOutputDirectory="PreserveNewest" />
|
||||||
<None Include="BlazorServerTagHelpers.razor" CopyToOutputDirectory="PreserveNewest" />
|
<None Include="$(SharedFilesRoot)Compiler\BlazorServerTagHelpers.razor" CopyToOutputDirectory="PreserveNewest" />
|
||||||
</ItemGroup>
|
<None Include="$(SharedFilesRoot)Compiler\taghelpers.json" CopyToOutputDirectory="PreserveNewest" />
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\..\shared\taghelpers.json" CopyToOutputDirectory="PreserveNewest">
|
|
||||||
<Link>taghelpers.json</Link>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="..\..\..\Shared\Microsoft.AspNetCore.Razor.Serialization.Json\Microsoft.AspNetCore.Razor.Serialization.Json.projitems" Label="Shared" />
|
<Import Project="..\..\..\Shared\Microsoft.AspNetCore.Razor.Serialization.Json\Microsoft.AspNetCore.Razor.Serialization.Json.projitems" Label="Shared" />
|
||||||
|
|
|
@ -20,36 +20,15 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Resources\**\*.*" />
|
|
||||||
<None Remove="Resources\**\*.*" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Resources\**\*.*" />
|
|
||||||
<EmbeddedResource Include="..\..\..\Compiler\perf\Microbenchmarks\MSN.cshtml">
|
|
||||||
<Link>Resources\%(FileName)%(Extension)</Link>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="..\..\test\Microsoft.AspNetCore.Razor.Test.Common.Tooling\Workspaces\TestServices.cs">
|
|
||||||
<Link>TestServices\%(FileName)%(Extension)</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\test\Microsoft.AspNetCore.Razor.Test.Common.Tooling\Workspaces\TestWorkspace.cs">
|
|
||||||
<Link>TestServices\%(FileName)%(Extension)</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\test\Microsoft.AspNetCore.Razor.Test.Common.Tooling\Workspaces\TestLanguageServices.cs">
|
|
||||||
<Link>TestServices\%(FileName)%(Extension)</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\test\Microsoft.AspNetCore.Razor.Test.Common.Tooling\Workspaces\TestWorkspaceServices.cs">
|
|
||||||
<Link>TestServices\%(FileName)%(Extension)</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\test\Microsoft.AspNetCore.Razor.Test.Common.Tooling\Mef\ExportProviderExtensions.cs">
|
|
||||||
<Link>TestServices\%(FileName)%(Extension)</Link>
|
|
||||||
</Compile>
|
|
||||||
|
|
||||||
<None Remove=".gitignore" />
|
<None Remove=".gitignore" />
|
||||||
<None Remove="BenchmarkDotNet.Artifacts\**" />
|
<None Remove="BenchmarkDotNet.Artifacts\**" />
|
||||||
|
|
||||||
|
<Compile Remove="Resources\**\*.*" />
|
||||||
|
<None Remove="Resources\**\*.*" />
|
||||||
|
|
||||||
|
<EmbeddedResource Include="Resources\**\*.*" />
|
||||||
|
<EmbeddedResource Include="$(SharedFilesRoot)\Tooling\**\*.*" Link="Resources\%(RecursiveDir)%(Filename)%(Extension)" />
|
||||||
|
<EmbeddedResource Include="$(SharedFilesRoot)\Compiler\MSN.cshtml" Link="Resources\%(FileName)%(Extension)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -42,12 +42,12 @@ namespace Microsoft.AspNetCore.Razor.ProjectEngineHost.Test.Serialization;
|
||||||
public class SerializerValidationTest(ITestOutputHelper testOutput) : ToolingTestBase(testOutput)
|
public class SerializerValidationTest(ITestOutputHelper testOutput) : ToolingTestBase(testOutput)
|
||||||
{
|
{
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("Kendo.Mvc.Examples.project.razor.json")]
|
[InlineData("Kendo.Mvc.Examples.project.razor.json", "Telerik")]
|
||||||
[InlineData("project.razor.json")]
|
[InlineData("project.razor.json")]
|
||||||
public void VerifyMessagePack_RazorProjectInfo(string resourceName)
|
public void VerifyMessagePack_RazorProjectInfo(string resourceName, string? folderName = null)
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var resourceBytes = RazorTestResources.GetResourceBytes(resourceName, "Benchmarking");
|
var resourceBytes = RazorTestResources.GetResourceBytes(resourceName, folderName);
|
||||||
|
|
||||||
// Read tag helpers from JSON
|
// Read tag helpers from JSON
|
||||||
var originalProjectInfo = JsonDataConvert.DeserializeProjectInfo(resourceBytes);
|
var originalProjectInfo = JsonDataConvert.DeserializeProjectInfo(resourceBytes);
|
||||||
|
@ -66,12 +66,12 @@ public class SerializerValidationTest(ITestOutputHelper testOutput) : ToolingTes
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("Kendo.Mvc.Examples.taghelpers.json")]
|
[InlineData("Kendo.Mvc.Examples.taghelpers.json", "Telerik")]
|
||||||
[InlineData("taghelpers.json")]
|
[InlineData("taghelpers.json")]
|
||||||
public void VerifyMessagePack_TagHelpers(string resourceName)
|
public void VerifyMessagePack_TagHelpers(string resourceName, string? folderName = null)
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var resourceBytes = RazorTestResources.GetResourceBytes(resourceName, "Benchmarking");
|
var resourceBytes = RazorTestResources.GetResourceBytes(resourceName, folderName);
|
||||||
|
|
||||||
// Read tag helpers from JSON
|
// Read tag helpers from JSON
|
||||||
var originalTagHelpers = JsonDataConvert.DeserializeTagHelperArray(resourceBytes);
|
var originalTagHelpers = JsonDataConvert.DeserializeTagHelperArray(resourceBytes);
|
||||||
|
@ -90,12 +90,12 @@ public class SerializerValidationTest(ITestOutputHelper testOutput) : ToolingTes
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("Kendo.Mvc.Examples.project.razor.json")]
|
[InlineData("Kendo.Mvc.Examples.project.razor.json", "Telerik")]
|
||||||
[InlineData("project.razor.json")]
|
[InlineData("project.razor.json")]
|
||||||
public void VerifyJson_RazorProjectInfo(string resourceName)
|
public void VerifyJson_RazorProjectInfo(string resourceName, string? folderName = null)
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var resourceBytes = RazorTestResources.GetResourceBytes(resourceName, "Benchmarking");
|
var resourceBytes = RazorTestResources.GetResourceBytes(resourceName, folderName);
|
||||||
|
|
||||||
// Read tag helpers from JSON
|
// Read tag helpers from JSON
|
||||||
var originalProjectInfo = JsonDataConvert.DeserializeProjectInfo(resourceBytes);
|
var originalProjectInfo = JsonDataConvert.DeserializeProjectInfo(resourceBytes);
|
||||||
|
@ -123,8 +123,8 @@ public class SerializerValidationTest(ITestOutputHelper testOutput) : ToolingTes
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("Kendo.Mvc.Examples.taghelpers.json", "Benchmarking")]
|
[InlineData("Kendo.Mvc.Examples.taghelpers.json", "Telerik")]
|
||||||
[InlineData("taghelpers.json", "Benchmarking")]
|
[InlineData("taghelpers.json")]
|
||||||
[InlineData("BlazorServerApp.TagHelpers.json")]
|
[InlineData("BlazorServerApp.TagHelpers.json")]
|
||||||
public void VerifyJson_TagHelpers(string resourceName, string? folderName = null)
|
public void VerifyJson_TagHelpers(string resourceName, string? folderName = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<!-- To generate baselines, run tests with /p:GenerateBaselines=true -->
|
<!-- To generate baselines, run tests with /p:GenerateBaselines=true -->
|
||||||
<DefineConstants Condition="'$(GenerateBaselines)'=='true'">$(DefineConstants);GENERATE_BASELINES</DefineConstants>
|
<DefineConstants Condition="'$(GenerateBaselines)'=='true'">$(DefineConstants);GENERATE_BASELINES</DefineConstants>
|
||||||
|
|
||||||
<!-- To generate baselines, run tests with /p:GenerateJsonFiles=true -->
|
<!-- To generate baselines, run tests with /p:GenerateJsonFiles=true -->
|
||||||
<DefineConstants Condition="'$(GenerateJsonFiles)'=='true'">$(DefineConstants);GENERATE_JSON_FILES</DefineConstants>
|
<DefineConstants Condition="'$(GenerateJsonFiles)'=='true'">$(DefineConstants);GENERATE_JSON_FILES</DefineConstants>
|
||||||
|
|
||||||
|
@ -19,18 +19,10 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Resources\**\*.*" />
|
<Compile Remove="Resources\**\*.*" />
|
||||||
<Compile Include="..\..\..\Shared\Microsoft.AspNetCore.Razor.Test.Common\Language\Legacy\SyntaxNodeWriter.cs" />
|
<None Remove="Resources\**\*.*" />
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Resources\**\*.*" />
|
<EmbeddedResource Include="Resources\**\*.*" />
|
||||||
</ItemGroup>
|
<EmbeddedResource Include="$(SharedFilesRoot)\Tooling\**\*.*" Link="Resources\%(RecursiveDir)%(Filename)%(Extension)" />
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="..\..\benchmarks\Microsoft.AspNetCore.Razor.Microbenchmarks\Resources\project.razor.json" Link="Resources\Benchmarking\project.razor.json" />
|
|
||||||
<EmbeddedResource Include="..\..\benchmarks\Microsoft.AspNetCore.Razor.Microbenchmarks\Resources\taghelpers.json" Link="Resources\Benchmarking\taghelpers.json" />
|
|
||||||
<EmbeddedResource Include="..\..\benchmarks\Microsoft.AspNetCore.Razor.Microbenchmarks\Resources\Telerik\Kendo.Mvc.Examples.project.razor.json" Link="Resources\Benchmarking\Kendo.Mvc.Examples.project.razor.json" />
|
|
||||||
<EmbeddedResource Include="..\..\benchmarks\Microsoft.AspNetCore.Razor.Microbenchmarks\Resources\Telerik\Kendo.Mvc.Examples.taghelpers.json" Link="Resources\Benchmarking\Kendo.Mvc.Examples.taghelpers.json" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче