Skip to content

Commit

Permalink
#132 - Tests -> UnitTests (#137) +semver:none
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepami authored Feb 6, 2025
1 parent f2ed303 commit 3c8c3d8
Show file tree
Hide file tree
Showing 28 changed files with 31 additions and 31 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ jobs:
run: dotnet build /p:Version=${{ steps.version_step.outputs.fullSemVer }} --no-restore -c Release -v n
- name: Unit Tests
run: |
dotnet test -c Release ./tests/HydraScript.Infrastructure.LexerRegexGenerator.Tests/HydraScript.Infrastructure.LexerRegexGenerator.Tests.csproj --no-build -v n
dotnet test -c Release ./tests/HydraScript.Infrastructure.LexerRegexGenerator.UnitTests/HydraScript.Infrastructure.LexerRegexGenerator.UnitTests.csproj --no-build -v n
dotnet test -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --no-build -v n --filter="Category=Unit"
mkdir coverage-report
- name: Code Coverage Summary Report For Merge Request
if: github.event_name == 'pull_request_target'
uses: 5monkeys/cobertura-action@master
with:
path: ./tests/HydraScript.Tests/coverage.cobertura.xml
path: ./tests/HydraScript.UnitTests/coverage.cobertura.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 20
fail_below_threshold: true
Expand All @@ -72,7 +72,7 @@ jobs:
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.1
with:
reports: './tests/HydraScript.Tests/coverage.cobertura.xml'
reports: './tests/HydraScript.UnitTests/coverage.cobertura.xml'
targetdir: './coverage-report'
- name: Upload coverage report artifact
if: github.event_name == 'push'
Expand All @@ -87,4 +87,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: windows_build_${{ steps.version_step.outputs.fullSemVer }}
path: ./src/HydraScript/bin/Release/net8.0
path: ./src/HydraScript/bin/Release/net9.0
4 changes: 2 additions & 2 deletions ExtendedJavaScriptSubset.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HydraScript", "src\HydraScript\HydraScript.csproj", "{5DA79C0C-2B98-4E64-81EA-92AFFC5204D3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HydraScript.Tests", "tests\HydraScript.Tests\HydraScript.Tests.csproj", "{F0DD56CB-C68A-4CDC-AA54-0A07342FE08B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HydraScript.UnitTests", "tests\HydraScript.UnitTests\HydraScript.UnitTests.csproj", "{F0DD56CB-C68A-4CDC-AA54-0A07342FE08B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{86CF2A2F-4DFE-48E7-B062-EF824730916A}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -98,7 +98,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HydraScript.IntegrationTest
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HydraScript.Infrastructure.LexerRegexGenerator", "src\Infrastructure\HydraScript.Infrastructure.LexerRegexGenerator\HydraScript.Infrastructure.LexerRegexGenerator.csproj", "{74D1495B-12A4-4E1A-ABE0-93029ECDC5FE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HydraScript.Infrastructure.LexerRegexGenerator.Tests", "tests\HydraScript.Infrastructure.LexerRegexGenerator.Tests\HydraScript.Infrastructure.LexerRegexGenerator.Tests.csproj", "{829111AD-4A5C-4B3D-AC28-208309CE10D6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HydraScript.Infrastructure.LexerRegexGenerator.UnitTests", "tests\HydraScript.Infrastructure.LexerRegexGenerator.UnitTests\HydraScript.Infrastructure.LexerRegexGenerator.UnitTests.csproj", "{829111AD-4A5C-4B3D-AC28-208309CE10D6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="HydraScript.Tests" />
<InternalsVisibleTo Include="HydraScript.UnitTests" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="HydraScript.Tests" />
<InternalsVisibleTo Include="HydraScript.UnitTests" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using NSubstitute;
using Xunit;

namespace HydraScript.Infrastructure.LexerRegexGenerator.Tests;
namespace HydraScript.Infrastructure.LexerRegexGenerator.UnitTests;

public class PatternGeneratorTests
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using HydraScript.Domain.BackEnd.Impl.Instructions.WithJump;
using HydraScript.Domain.BackEnd.Impl.Values;

namespace HydraScript.Tests.TestData;
namespace HydraScript.UnitTests.TestData;

public class InstructionsData : IEnumerable<object[]>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace HydraScript.Tests.TestData;
namespace HydraScript.UnitTests.TestData;

public class LexerSuccessData : TheoryData<string>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections;

namespace HydraScript.Tests.TestData;
namespace HydraScript.UnitTests.TestData;

public class ParserSuccessTestData : IEnumerable<object[]>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using HydraScript.Domain.BackEnd.Impl.Values;
using Xunit;

namespace HydraScript.Tests.Unit.BackEnd;
namespace HydraScript.UnitTests.Unit.BackEnd;

public class AddressedInstructionsTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using HydraScript.Domain.BackEnd.Impl.Addresses;
using Xunit;

namespace HydraScript.Tests.Unit.BackEnd;
namespace HydraScript.UnitTests.Unit.BackEnd;

public class CallTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using HydraScript.Domain.BackEnd.Impl.Addresses;
using Xunit;

namespace HydraScript.Tests.Unit.BackEnd;
namespace HydraScript.UnitTests.Unit.BackEnd;

public class HashAddressTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using HydraScript.Domain.BackEnd;
using HydraScript.Domain.BackEnd.Impl.Addresses;
using HydraScript.Domain.BackEnd.Impl.Instructions.WithJump;
using HydraScript.Tests.TestData;
using HydraScript.UnitTests.TestData;
using Xunit;

namespace HydraScript.Tests.Unit.BackEnd;
namespace HydraScript.UnitTests.Unit.BackEnd;

public class InstructionsTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using HydraScript.Domain.BackEnd.Impl.Values;
using Xunit;

namespace HydraScript.Tests.Unit.BackEnd;
namespace HydraScript.UnitTests.Unit.BackEnd;

public class ValuesTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using HydraScript.Domain.BackEnd.Impl.Values;
using Xunit;

namespace HydraScript.Tests.Unit.BackEnd;
namespace HydraScript.UnitTests.Unit.BackEnd;

public class VirtualMachineTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using HydraScript.Domain.FrontEnd.Lexer.Impl;
using HydraScript.Domain.FrontEnd.Lexer.TokenTypes;
using HydraScript.Infrastructure;
using HydraScript.Tests.TestData;
using HydraScript.UnitTests.TestData;
using Xunit;

namespace HydraScript.Tests.Unit.FrontEnd;
namespace HydraScript.UnitTests.Unit.FrontEnd;

public class RegexLexerTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using HydraScript.Infrastructure;
using Xunit;

namespace HydraScript.Tests.Unit.FrontEnd;
namespace HydraScript.UnitTests.Unit.FrontEnd;

public class StructureTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using HydraScript.Domain.FrontEnd.Lexer.Impl;
using Xunit;

namespace HydraScript.Tests.Unit.FrontEnd;
namespace HydraScript.UnitTests.Unit.FrontEnd;

public class TextCoordinateSystemComputerTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using HydraScript.Domain.FrontEnd.Parser;
using HydraScript.Domain.FrontEnd.Parser.Impl;
using HydraScript.Infrastructure;
using HydraScript.Tests.TestData;
using HydraScript.UnitTests.TestData;
using Xunit;

namespace HydraScript.Tests.Unit.FrontEnd;
namespace HydraScript.UnitTests.Unit.FrontEnd;

public class TopDownParserTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using ScriptBody = HydraScript.Domain.FrontEnd.Parser.Impl.Ast.Nodes.ScriptBody;
using TypeIdentValue = HydraScript.Domain.FrontEnd.Parser.Impl.Ast.Nodes.Declarations.TypeIdentValue;

namespace HydraScript.Tests.Unit.IR;
namespace HydraScript.UnitTests.Unit.IR;

public class AstNodeTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using FunctionDeclaration = HydraScript.Domain.FrontEnd.Parser.Impl.Ast.Nodes.Declarations.AfterTypesAreLoaded.FunctionDeclaration;
using IdentifierReference = HydraScript.Domain.FrontEnd.Parser.Impl.Ast.Nodes.Expressions.PrimaryExpressions.IdentifierReference;

namespace HydraScript.Tests.Unit.IR;
namespace HydraScript.UnitTests.Unit.IR;

public class FunctionWithUndefinedReturnStorageTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using HydraScript.Domain.IR.Impl;
using Xunit;

namespace HydraScript.Tests.Unit.IR;
namespace HydraScript.UnitTests.Unit.IR;

public class SymbolTableTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using HydraScript.Domain.IR.Types;
using Xunit;

namespace HydraScript.Tests.Unit.IR.Types;
namespace HydraScript.UnitTests.Unit.IR.Types;

public class ObjectTypeTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using HydraScript.Domain.IR.Types;
using Xunit;

namespace HydraScript.Tests.Unit.IR.Types;
namespace HydraScript.UnitTests.Unit.IR.Types;

public class TypeTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Extensions.Options;
using Xunit;

namespace HydraScript.Tests.Unit.Infrastructure;
namespace HydraScript.UnitTests.Unit.Infrastructure;

public class LoggingEntitiesTests
{
Expand Down

0 comments on commit 3c8c3d8

Please sign in to comment.