Skip to content

Commit

Permalink
Move the tests (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
clipperhouse authored Jul 22, 2024
1 parent e86ff76 commit d1c4dc6
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 30 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<Using Include="NUnit.Framework" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\uax29\uax29.csproj" />
</ItemGroup>

</Project>
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions uax29.net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "uax29", "uax29\uax29.csproj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Codegen", "Codegen\Codegen.csproj", "{C5D56C4E-7E06-4FD8-B7F8-FE29667A08F7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{F1CE9A66-098F-4BC4-AA3A-7046C2AC0833}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -27,6 +29,10 @@ Global
{C5D56C4E-7E06-4FD8-B7F8-FE29667A08F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5D56C4E-7E06-4FD8-B7F8-FE29667A08F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5D56C4E-7E06-4FD8-B7F8-FE29667A08F7}.Release|Any CPU.Build.0 = Release|Any CPU
{F1CE9A66-098F-4BC4-AA3A-7046C2AC0833}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F1CE9A66-098F-4BC4-AA3A-7046C2AC0833}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F1CE9A66-098F-4BC4-AA3A-7046C2AC0833}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F1CE9A66-098F-4BC4-AA3A-7046C2AC0833}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
37 changes: 7 additions & 30 deletions uax29/uax29.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,18 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<!-- Exclude test packages from the Release build -->
<ItemGroup Condition="'$(Configuration)' != 'Release'">
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<Using Include="NUnit.Framework" />
</ItemGroup>

<!-- Remove test files from Release build -->
<ItemGroup Condition="'$(Configuration)' == 'Release'">
<None Remove="**/*.Test.cs" />
<Compile Remove="**/*.Test.cs" />
<ItemGroup>
<InternalsVisibleTo Include="Tests" />
</ItemGroup>

<!-- Only test in Debug configuration -->
<PropertyGroup Condition="'$(Configuration)' != 'Release'">
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<!--
To demonstrate that the above is working, observe the differences between:
dotnet test -c Release
dotnet test -c Debug
-->

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PackageId>UAX29</PackageId>
<Version>2.2.0</Version>
<Authors>clipperhouse</Authors>
<Description>Tokenizes (split) words, graphemes and sentences, based on Unicode text segmentation (UAX #29). https://unicode.org/reports/tr29/</Description>
<!-- <PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://example.com</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon> -->
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/clipperhouse/uax29.net</PackageProjectUrl>
<RepositoryUrl>https://github.com/clipperhouse/uax29.net</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
Expand All @@ -50,7 +26,8 @@
<None Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<Folder Include="Legacy/" />
<ItemGroup>
<Folder Include="Legacy/" />
<Folder Include="Extensions/" />
</ItemGroup>
</Project>

0 comments on commit d1c4dc6

Please sign in to comment.