Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Feb 22, 2024
1 parent a4fe3f1 commit 00f95da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `Unreleased` section name is replaced by the expected version of next releas

### Added

- `TypeeSafeEnum.caseValues<'t>`: Yields all values of a Union
- `TypeSafeEnum.caseValues<'t>`: Yields all values of a union (that is a `TypeSafeEnum`) [#115](https://github.com/jet/FsCodec/pull/115)

### Changed
### Removed
Expand Down
1 change: 1 addition & 0 deletions tests/FsCodec.Tests/FsCodec.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ItemGroup>
<Compile Include="StreamNameTests.fs" />
<Compile Include="CompressionTests.fs" />
<Compile Include="TypeSafeEnumTests.fs" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions tests/FsCodec.Tests/TypeSafeEnumTests.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module FsCodec.Tests.TypeSafeEnumTests

open FsCodec
open Swensen.Unquote
open Xunit

type Outcome = Joy | Pain | Misery

let [<Fact>] caseNames () =
[| Joy; Pain; Misery |] =! TypeSafeEnum.caseValues<_>

0 comments on commit 00f95da

Please sign in to comment.