Move tests to a separate project
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Ben Harris 2020-11-10 18:35:21 -05:00
parent b8e2634193
commit 35bbd30c25
24 changed files with 50 additions and 23 deletions

View File

@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
<PackageReference Include="YamlDotNet" Version="8.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IRCStates\IRCStates.csproj" />
<ProjectReference Include="..\IRCTokens\IRCTokens.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Tokenization\Data\msg-join.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tokenization\Data\msg-split.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@ -23,7 +23,7 @@ namespace IRCTokens.Tests
[TestMethod]
public void Split()
{
foreach (var test in LoadYaml<SplitModel>("Tests/Data/msg-split.yaml").Tests)
foreach (var test in LoadYaml<SplitModel>("Tokenization/Data/msg-split.yaml").Tests)
{
var tokens = new Line(test.Input);
var atoms = test.Atoms;
@ -40,7 +40,7 @@ namespace IRCTokens.Tests
[TestMethod]
public void Join()
{
foreach (var test in LoadYaml<JoinModel>("Tests/Data/msg-join.yaml").Tests)
foreach (var test in LoadYaml<JoinModel>("Tokenization/Data/msg-join.yaml").Tests)
{
var atoms = test.Atoms;
var line = new Line

View File

@ -9,13 +9,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TokensSample", "Examples\To
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRCStates", "IRCStates\IRCStates.csproj", "{233E3CB4-61F1-4368-9139-7E9F4A58ED2D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StatesSample", "Examples\States\StatesSample.csproj", "{BC9F6696-9D83-4F7A-9E15-CE4D3626C1AF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StatesSample", "Examples\States\StatesSample.csproj", "{BC9F6696-9D83-4F7A-9E15-CE4D3626C1AF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1A85EB22-D7B4-417F-AC3B-DAFD97DDEA08}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IRCSharp.Tests", "IRCSharp.Tests\IRCSharp.Tests.csproj", "{B420F0F3-1ED0-4FD3-9E91-2E7F96F9FF7F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{4260E03C-6E28-4519-8943-5B477841A75A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -38,10 +42,18 @@ Global
{BC9F6696-9D83-4F7A-9E15-CE4D3626C1AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC9F6696-9D83-4F7A-9E15-CE4D3626C1AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC9F6696-9D83-4F7A-9E15-CE4D3626C1AF}.Release|Any CPU.Build.0 = Release|Any CPU
{B420F0F3-1ED0-4FD3-9E91-2E7F96F9FF7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B420F0F3-1ED0-4FD3-9E91-2E7F96F9FF7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B420F0F3-1ED0-4FD3-9E91-2E7F96F9FF7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B420F0F3-1ED0-4FD3-9E91-2E7F96F9FF7F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A45DA39B-6B47-4713-8049-3B36E0235B67} = {4260E03C-6E28-4519-8943-5B477841A75A}
{BC9F6696-9D83-4F7A-9E15-CE4D3626C1AF} = {4260E03C-6E28-4519-8943-5B477841A75A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B91F0EA-8564-4318-8EEC-ED0640475141}
EndGlobalSection

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<PackageId>IRCStates</PackageId>
<Version>1.0.2</Version>
<Version>1.1.0</Version>
<Authors>Ben Harris</Authors>
<Company>tildeverse.org</Company>
<IsPackable>true</IsPackable>
@ -13,7 +13,7 @@
<RepositoryUrl>https://tildegit.org/irctokens/ircsharp/src/branch/main/IRCStates</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>irc</PackageTags>
<PackageVersion>1.0.2</PackageVersion>
<PackageVersion>1.1.0</PackageVersion>
</PropertyGroup>
<ItemGroup>
@ -21,9 +21,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
</ItemGroup>
<ItemGroup>

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<PackageId>IRCTokens</PackageId>
<Version>1.0.2</Version>
<Version>1.1.0</Version>
<Authors>Ben Harris</Authors>
<Company>tildeverse.org</Company>
<IsPackable>true</IsPackable>
@ -13,7 +13,7 @@
<RepositoryUrl>https://tildegit.org/irctokens/ircsharp/src/branch/main/IRCTokens</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>irc</PackageTags>
<PackageVersion>1.0.2</PackageVersion>
<PackageVersion>1.1.0</PackageVersion>
</PropertyGroup>
<ItemGroup>
@ -21,21 +21,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="YamlDotNet" Version="8.1.0" />
</ItemGroup>
<ItemGroup>
<None Update="Tests\Data\msg-join.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Tests\Data\msg-split.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>