Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
add bdd tests for .net 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sawilde committed Jan 10, 2021
1 parent adf6b05 commit c3a0be4
Show file tree
Hide file tree
Showing 11 changed files with 497 additions and 91 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

- name: Setup .NET Core 3.1.404
- name: Setup .NET Core 5.0.101
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.404'
dotnet-version: '5.0.101'

- name: Build OpenCover x64
run: |
Expand Down
8 changes: 7 additions & 1 deletion build/opencover.build
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@
</exec>

</target>


<target name="test-bdd-release" >
<property name="configuration" value="release" />
<property name="platform" value="x64" />
<call target="test-bdd" />
</target>

<target name="test-cpp" depends="test-cpp-internal" />

<target name="test-cpp-internal" description="Run C++ tests" >
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>OpenCover.Simple.Target.Core._5._0.Embedded</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\OpenCover.Simple.Target.Core\Program.cs" Link="Program.cs" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>OpenCover.Simple.Target.Core._5._0.Portable</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\OpenCover.Simple.Target.Core\Program.cs" Link="Program.cs" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>OpenCover.Simple.Target.Core._5._0</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\OpenCover.Simple.Target.Core\Program.cs" Link="Program.cs" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion main/OpenCover.Simple.Target.Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static void Main(string[] args)
// The factorial function itself
var factorial = Fix(F);

for (int j = 0; j < 1000; j++)
for (int j = 0; j < 100; j++)
{
for (var i = 0; i < 12; i++)
{
Expand Down
35 changes: 35 additions & 0 deletions main/OpenCover.Specs/DotNetCore.feature
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,38 @@ Scenario: Get coverage of a .net core 3.1 application using oldstyle, with debug
When I execute OpenCover against the target application using the switch '-oldstyle'
Then I should have a results.xml file with a coverage greater than or equal to '100'%

Scenario: Get coverage of a .net core 5.0 application
Given I can find the OpenCover application
And I can find the target .net core '5.0' application 'OpenCover.Simple.Target.Core.5.0'
When I execute OpenCover against the target application using the switch ''
Then I should have a results.xml file with a coverage greater than or equal to '100'%

Scenario: Get coverage of a .net core 5.0 application using oldstyle
Given I can find the OpenCover application
And I can find the target .net core '5.0' application 'OpenCover.Simple.Target.Core.5.0'
When I execute OpenCover against the target application using the switch '-oldstyle'
Then I should have a results.xml file with a coverage greater than or equal to '100'%

Scenario: Get coverage of a .net core 5.0 application, with debugType = portable
Given I can find the OpenCover application
And I can find the target .net core '5.0' application 'OpenCover.Simple.Target.Core.5.0.Portable'
When I execute OpenCover against the target application using the switch ''
Then I should have a results.xml file with a coverage greater than or equal to '100'%

Scenario: Get coverage of a .net core 5.0 application using oldstyle, with debugType = portable
Given I can find the OpenCover application
And I can find the target .net core '5.0' application 'OpenCover.Simple.Target.Core.5.0.Portable'
When I execute OpenCover against the target application using the switch '-oldstyle'
Then I should have a results.xml file with a coverage greater than or equal to '100'%

Scenario: Get coverage of a .net core 5.0 application, with debugType = embedded
Given I can find the OpenCover application
And I can find the target .net core '5.0' application 'OpenCover.Simple.Target.Core.5.0.Embedded'
When I execute OpenCover against the target application using the switch ''
Then I should have a results.xml file with a coverage greater than or equal to '100'%

Scenario: Get coverage of a .net core 5.0 application using oldstyle, with debugType = embedded
Given I can find the OpenCover application
And I can find the target .net core '5.0' application 'OpenCover.Simple.Target.Core.5.0.Embedded'
When I execute OpenCover against the target application using the switch '-oldstyle'
Then I should have a results.xml file with a coverage greater than or equal to '100'%
Loading

0 comments on commit c3a0be4

Please sign in to comment.