Update kotlin libs

This commit is contained in:
2023-05-09 22:40:10 +02:00
parent 5aa2e80c5f
commit f2bdc8d6c7
66 changed files with 261 additions and 264 deletions
@@ -33,7 +33,7 @@ internal class LoggedInUserExtractorTest {
createToken(),
createToken(username = "user", id = 1, secret = "not the correct secret"),
createToken(username = "user", id = 1) + "\"efesfsef",
"something that is not even a token"
"something that is not even a token",
)
@ParameterizedTest(name = "[{index}] token `{0}` should be invalid")
+2 -2
View File
@@ -21,7 +21,7 @@ fun isRight() = object : Matcher<Either<*, *>> {
override fun invoke(actual: Either<*, *>) = when (actual) {
is Either.Right -> MatchResult.Match
is Either.Left -> {
val valueA = actual.a
val valueA = actual.value
MatchResult.Mismatch("is Either.Left<${if (valueA == null) "Null" else valueA::class.simpleName}>")
}
}
@@ -34,7 +34,7 @@ inline fun <reified A> isLeftOfType() = object : Matcher<Either<*, *>> {
override fun invoke(actual: Either<*, *>) = when (actual) {
is Either.Right -> MatchResult.Mismatch("was Either.Right<>")
is Either.Left -> {
val valueA = actual.a
val valueA = actual.value
if (valueA is A) MatchResult.Match
else MatchResult.Mismatch("was Left<${if (valueA == null) "Null" else valueA::class.simpleName}>")
}
+2 -2
View File
@@ -33,7 +33,7 @@ internal class SearchTermsParserKtTest {
"tag:'example abc' title:'other with words' this is the end ",
title = "other with words",
tag = "example abc",
all = "this is the end"
all = "this is the end",
),
createResult("tag:blah", tag = "blah"),
createResult("tag:'some words'", tag = "some words"),
@@ -41,7 +41,7 @@ internal class SearchTermsParserKtTest {
createResult(
"tag:'double quote inside single \" ' global",
tag = "double quote inside single \" ",
all = "global"
all = "global",
),
)
@@ -22,7 +22,7 @@ internal class UserValidationsTest {
LoginForm(username = "", password = ""),
LoginForm(username = "a", password = "aaaa"),
LoginForm(username = "a".repeat(51), password = "a".repeat(8)),
LoginForm(username = "a".repeat(10), password = "a".repeat(7))
LoginForm(username = "a".repeat(10), password = "a".repeat(7)),
)
@ParameterizedTest
@@ -34,7 +34,7 @@ internal class UserValidationsTest {
@Suppress("Unused")
fun validLoginForms(): Stream<LoginForm> = Stream.of(
LoginForm(username = "a".repeat(50), password = "a".repeat(72)),
LoginForm(username = "a".repeat(3), password = "a".repeat(8))
LoginForm(username = "a".repeat(3), password = "a".repeat(8)),
)
@ParameterizedTest
@@ -53,7 +53,7 @@ internal class UserValidationsTest {
RegisterForm(username = "", password = ""),
RegisterForm(username = "a", password = "aaaa"),
RegisterForm(username = "a".repeat(51), password = "a".repeat(8)),
RegisterForm(username = "a".repeat(10), password = "a".repeat(7))
RegisterForm(username = "a".repeat(10), password = "a".repeat(7)),
)
@ParameterizedTest
@@ -65,7 +65,7 @@ internal class UserValidationsTest {
@Suppress("Unused")
fun validRegisterForms(): Stream<RegisterForm> = Stream.of(
RegisterForm(username = "a".repeat(50), password = "a".repeat(72)),
RegisterForm(username = "a".repeat(3), password = "a".repeat(8))
RegisterForm(username = "a".repeat(3), password = "a".repeat(8)),
)
@ParameterizedTest