This is version 0.1.0 but with fixed publishing.
Warning
Note that this module is built with Kotlin 2.0.0+ and may require the K2 compiler.
GPG Signatures
This release's artifacts on Maven Central are signed with the E4052598808C27E9C6117FEB97DE4F9C9745338F
root GPG key using the 752F70D74BE46BEB12ED1D53EB00F7B8F4C71F3B
sub-key. Attached in this release is a GPG armour export of the key that can be used to verify the files.
An example of verifying the signed files (to be run in the shell) is as follows (you will need to install GnuPG if you have not already done so):
gpg --import androidx-ktx-extras-key.pgp
gpg --verify <asc file> <actual file>
Expected output:
❯ gpg --verify kotest-common-enums-0.1.1-javadoc.jar.asc kotest-common-enums-0.1.1-javadoc.jar
gpg: Signature made Thu 21 Aug 21:04:50 2025 +08
gpg: using RSA key 752F70D74BE46BEB12ED1D53EB00F7B8F4C71F3B
gpg: Good signature from "Edric Chan (Key used for Github commit signing) <email>" [ultimate]
Caution
Note that this specific sub-key will expire in 1 Jan 2026!
Below are the original release notes for 0.1.0:
0.1.0 (29 May 2024)
This is the initial release of this artifact, which provides common utilities for testing
code that uses EnumFromValue
or similar methods:
// Enum
enum class Example {
One,
Two,
Three;
companion object {
fun fromValue(value: String) = when (value.lowercase()) {
"one" -> One
"example", "two" -> Two
else -> Three
}
}
}
// Test code
val valuesMap = mapOf(
"one" to Example.One,
"two" to Example.Two,
"example" to Example.Two,
"other value" to Example.Three
)
class ExampleEnumTest : DescribeSpec({
include(
enumTests(
describeName = "fromValue",
enumValuesMap = valuesMap,
fromValueOrNullFn = Example.Companion::fromValue,
invalidArb = Arb.string()
.filterNot { output -> output in enumValuesMap.map { it.key.value } }
)
)
})