Skip to content

Commit

Permalink
Add Expand.Test
Browse files Browse the repository at this point in the history
  • Loading branch information
kzrnm committed Oct 25, 2023
1 parent 66fe3b2 commit 015971e
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<EmbeddingSource>true</EmbeddingSource>
<DefineConstants Condition="'$(EmbeddingSource)'=='true'">$(DefineConstants);EMBEDDING</DefineConstants>

<SourceExpanderVersion>5.5.1</SourceExpanderVersion>

<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down
2 changes: 1 addition & 1 deletion Source/ac-library-csharp/ac-library-csharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<OutputItemType>Analyzer</OutputItemType>
</ProjectReference>
<PackageReference Include="SourceExpander.Embedder" Version="5.3.1" Condition="'$(EmbeddingSource)'=='true'">
<PackageReference Include="SourceExpander.Embedder" Version="$(SourceExpanderVersion)" Condition="'$(EmbeddingSource)'=='true'">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
25 changes: 25 additions & 0 deletions Test/Expand.Test/Expand.Test.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net7.0;netcoreapp3.1</TargetFrameworks>
<Nullable>annotations</Nullable>

<LangVersion Condition="'$(TargetFramework)' == 'netcoreapp3.1'">8</LangVersion>
<LangVersion Condition="'$(TargetFramework)' == 'net7.0'">11</LangVersion>

<NoWarn>$(NoWarn);CS0436;CS8981;CS0649</NoWarn>
<SourceExpander_Generator_ExpandingAll>true</SourceExpander_Generator_ExpandingAll>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SourceExpander.Generator" Version="$(SourceExpanderVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Source\ac-library-csharp\ac-library-csharp.csproj" />
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions Test/Expand.Test/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
partial class Program
{
static void Main()
{
#if EMBEDDING
System.Console.WriteLine(SourceExpander.Testing.AtCoder.MathLib.PowMod(255, 1L << 52, 12));
#endif
}
}
4 changes: 2 additions & 2 deletions Test/ac-library-csharp.Test/ac-library-csharp.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="SourceExpander.Core" Version="5.3.1" />
<PackageReference Include="SourceExpander.Core" Version="$(SourceExpanderVersion)" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="MersenneTwister" Version="1.0.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="SourceExpander.Embedder.Testing" Version="5.3.1" />
<PackageReference Include="SourceExpander.Embedder.Testing" Version="$(SourceExpanderVersion)" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down
11 changes: 9 additions & 2 deletions ac-library-csharp.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30413.136
# Visual Studio Version 17
VisualStudioVersion = 17.7.34031.279
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ac-library-csharp", "Source\ac-library-csharp\ac-library-csharp.csproj", "{7915FF27-0322-4460-A94E-FA7B86D5E25C}"
EndProject
Expand All @@ -24,6 +24,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AtCoderAnalyzer.Test", "Tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ac-library-csharp.LibraryChecker", "Test\ac-library-csharp.LibraryChecker\ac-library-csharp.LibraryChecker.csproj", "{D61D3584-B86E-4C1F-BB8A-A1747A60E834}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Expand.Test", "Test\Expand.Test\Expand.Test.csproj", "{5121294D-76A4-44D4-8C2C-36B29FC162E4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -50,6 +52,10 @@ Global
{D61D3584-B86E-4C1F-BB8A-A1747A60E834}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D61D3584-B86E-4C1F-BB8A-A1747A60E834}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D61D3584-B86E-4C1F-BB8A-A1747A60E834}.Release|Any CPU.Build.0 = Release|Any CPU
{5121294D-76A4-44D4-8C2C-36B29FC162E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5121294D-76A4-44D4-8C2C-36B29FC162E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5121294D-76A4-44D4-8C2C-36B29FC162E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5121294D-76A4-44D4-8C2C-36B29FC162E4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -58,6 +64,7 @@ Global
{D0662927-8142-43D2-ABA9-C1977107F0ED} = {573A3DC6-BEB2-4E3A-8EB3-E4CB88F3C8F1}
{522A1037-5060-4CBA-A4A3-99624FAD732E} = {573A3DC6-BEB2-4E3A-8EB3-E4CB88F3C8F1}
{D61D3584-B86E-4C1F-BB8A-A1747A60E834} = {573A3DC6-BEB2-4E3A-8EB3-E4CB88F3C8F1}
{5121294D-76A4-44D4-8C2C-36B29FC162E4} = {573A3DC6-BEB2-4E3A-8EB3-E4CB88F3C8F1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3DF2A5DC-C174-486C-A24B-1F08FAA0D4F5}
Expand Down

0 comments on commit 015971e

Please sign in to comment.