diff --git a/CHANGELOG.md b/CHANGELOG.md index 11997bc..b1c70c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/tests/FsCodec.Tests/FsCodec.Tests.fsproj b/tests/FsCodec.Tests/FsCodec.Tests.fsproj index 1c2b239..9c5de84 100644 --- a/tests/FsCodec.Tests/FsCodec.Tests.fsproj +++ b/tests/FsCodec.Tests/FsCodec.Tests.fsproj @@ -8,6 +8,7 @@ + diff --git a/tests/FsCodec.Tests/TypeSafeEnumTests.fs b/tests/FsCodec.Tests/TypeSafeEnumTests.fs new file mode 100644 index 0000000..5bc91fe --- /dev/null +++ b/tests/FsCodec.Tests/TypeSafeEnumTests.fs @@ -0,0 +1,10 @@ +module FsCodec.Tests.TypeSafeEnumTests + +open FsCodec +open Swensen.Unquote +open Xunit + +type Outcome = Joy | Pain | Misery + +let [] caseNames () = + [| Joy; Pain; Misery |] =! TypeSafeEnum.caseValues<_>