Skip to content

Commit

Permalink
Merge branch 'main' into betterAsyncSupport
Browse files Browse the repository at this point in the history
  • Loading branch information
dharmaturtle committed Jul 1, 2023
2 parents 5025d3e + bcc9fe3 commit a06cb0c
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 31 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.400
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
uses: actions/setup-dotnet@v3
- name: Build
run: dotnet build -c Release "src/Hedgehog.Xunit"
- name: Test
Expand All @@ -29,7 +23,7 @@ jobs:
path-to-lcov: tests/Hedgehog.Xunit.Tests/TestResults/coverage.info
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish NuGet
uses: brandedoutcast/publish-nuget@v2.5.5
uses: alirezanet/publish-nuget@v3.1.0
with:
PROJECT_FILE_PATH: "src/Hedgehog.Xunit/Hedgehog.Xunit.fsproj"
PACKAGE_NAME: "Hedgehog.Xunit"
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.400
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
uses: actions/setup-dotnet@v3
- name: Build
run: dotnet build -c Release "src/Hedgehog.Xunit"
- name: Test
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ paket-files
# NCrunch
*.ncrunchsolution
*.ncrunchproject
*_NCrunch_*
*_NCrunch_*
*NCrunch_*
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### Next

* Named arguments work for `Property` and `Properties` in C#

### 0.5.2 (2023-01-13)

* Reduced Xunit dependencies to Xunit.Core
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"rollForward": "feature",
"version": "6.0.411"
}
}
20 changes: 10 additions & 10 deletions src/Hedgehog.Xunit/Attributes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ type PropertyAttribute(autoGenConfig, autoGenConfigArgs, tests, shrinks, size) =
/// let myTest (i:int) = ...
///
/// ```
member _.AutoGenConfig with set v = _autoGenConfig <- Some v
member _.AutoGenConfigArgs with set v = _autoGenConfigArgs <- Some v
member _.Tests with set v = _tests <- Some v
member _.Shrinks with set v = _shrinks <- Some v
member _.Size with set v = _size <- Some v
member _.AutoGenConfig with set v = _autoGenConfig <- Some v and get ():Type = failwith "this getter only exists to make C# named arguments work"
member _.AutoGenConfigArgs with set v = _autoGenConfigArgs <- Some v and get ():obj array = failwith "this getter only exists to make C# named arguments work"
member _.Tests with set v = _tests <- Some v and get ():int<tests> = failwith "this getter only exists to make C# named arguments work"
member _.Shrinks with set v = _shrinks <- Some v and get ():int<shrinks> = failwith "this getter only exists to make C# named arguments work"
member _.Size with set v = _size <- Some v and get ():Size = failwith "this getter only exists to make C# named arguments work"
member internal _.GetAutoGenConfig = _autoGenConfig
member internal _.GetAutoGenConfigArgs = _autoGenConfigArgs
member internal _.GetTests = _tests
Expand Down Expand Up @@ -81,11 +81,11 @@ type PropertiesAttribute(autoGenConfig, autoGenConfigArgs, tests, shrinks, size)
/// let myTest (i:int) = ...
///
/// ```
member _.AutoGenConfig with set v = _autoGenConfig <- Some v
member _.AutoGenConfigArgs with set v = _autoGenConfigArgs <- Some v
member _.Tests with set v = _tests <- Some v
member _.Shrinks with set v = _shrinks <- Some v
member _.Size with set v = _size <- Some v
member _.AutoGenConfig with set v = _autoGenConfig <- Some v and get ():Type = failwith "this getter only exists to make C# named arguments work"
member _.AutoGenConfigArgs with set v = _autoGenConfigArgs <- Some v and get ():obj array = failwith "this getter only exists to make C# named arguments work"
member _.Tests with set v = _tests <- Some v and get ():int<tests> = failwith "this getter only exists to make C# named arguments work"
member _.Shrinks with set v = _shrinks <- Some v and get ():int<shrinks> = failwith "this getter only exists to make C# named arguments work"
member _.Size with set v = _size <- Some v and get ():Size = failwith "this getter only exists to make C# named arguments work"
member internal _.GetAutoGenConfig = _autoGenConfig
member internal _.GetAutoGenConfigArgs = _autoGenConfigArgs
member internal _.GetTests = _tests
Expand Down
2 changes: 1 addition & 1 deletion src/Hedgehog.Xunit/Hedgehog.Xunit.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Docs at https://github.com/dharmaturtle/fsharp-hedgehog-xunit
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.3.4" />
<PackageReference Update="FSharp.Core" Version="7.0.300" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions tests/Hedgehog.Xunit.Tests/Hedgehog.Xunit.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="3.1.0">
<PackageReference Include="coverlet.msbuild" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="TaskBuilder.fs" Version="2.1.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand All @@ -28,7 +28,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="6.0.0" />
<PackageReference Update="FSharp.Core" Version="7.0.300" />
</ItemGroup>

</Project>

0 comments on commit a06cb0c

Please sign in to comment.