Skip to content
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

Move the tests #28

Merged
merged 5 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 clipperhouse

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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>