Skip to content

Commit fa29d1b

Browse files
committed
use CharSequence
1 parent 7480253 commit fa29d1b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/main/kotlin/com/memozr/assertk/AbstractAssertBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ inline fun <reified R : Any> of() = AbstractAssertBuilder.InstanceMatcher<R>()
1313
open class AbstractAssertBuilder<T : Any>(other: T?) {
1414
class InstanceMatcher<R>
1515

16-
open protected val assertion: AbstractAssert<*, T?> = Assertions.assertThat(other)
16+
open protected val assertion: AbstractAssert<*, out T?> = Assertions.assertThat(other)
1717

1818
infix fun isEqualTo(other: T): AbstractAssertBuilder<T> {
1919
assertion.isEqualTo(other)

src/main/kotlin/com/memozr/assertk/CharSequenceAssert.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ class CharSequenceAssert internal constructor(
3535
return this
3636
}
3737

38-
infix fun isEqualToIgnoringCase(expected: String): CharSequenceAssert {
38+
infix fun isEqualToIgnoringCase(expected: CharSequence): CharSequenceAssert {
3939
assertion.isEqualToIgnoringCase(expected)
4040
return this
4141
}
4242

43-
infix fun isNotEqualToIgnoringCase(expected: String): CharSequenceAssert {
43+
infix fun isNotEqualToIgnoringCase(expected: CharSequence): CharSequenceAssert {
4444
assertion.isNotEqualToIgnoringCase(expected)
4545
return this
4646
}
@@ -55,7 +55,7 @@ class CharSequenceAssert internal constructor(
5555
return this
5656
}
5757

58-
infix fun containsOnlyOnce(expected: String): CharSequenceAssert {
58+
infix fun containsOnlyOnce(expected: CharSequence): CharSequenceAssert {
5959
assertion.containsOnlyOnce(expected)
6060
return this
6161
}
@@ -70,7 +70,7 @@ class CharSequenceAssert internal constructor(
7070
return this
7171
}
7272

73-
infix fun containsIgnoringCase(expected: String): CharSequenceAssert {
73+
infix fun containsIgnoringCase(expected: CharSequence): CharSequenceAssert {
7474
assertion.containsIgnoringCase(expected)
7575
return this
7676
}
@@ -80,7 +80,7 @@ class CharSequenceAssert internal constructor(
8080
return this
8181
}
8282

83-
infix fun startsWith(expected: String): CharSequenceAssert {
83+
infix fun startsWith(expected: CharSequence): CharSequenceAssert {
8484
assertion.startsWith(expected)
8585
return this
8686
}
@@ -100,7 +100,7 @@ class CharSequenceAssert internal constructor(
100100
return this
101101
}
102102

103-
infix fun matches(expected: Pattern): CharSequenceAssert {
103+
infix fun matches(expected: Pattern): CharSequenceAssert {
104104
assertion.matches(expected)
105105
return this
106106
}
@@ -110,7 +110,7 @@ class CharSequenceAssert internal constructor(
110110
return this
111111
}
112112

113-
infix fun matches(expected: CharSequence): CharSequenceAssert {
113+
infix fun matches(expected: CharSequence): CharSequenceAssert {
114114
assertion.matches(expected)
115115
return this
116116
}
@@ -135,7 +135,7 @@ class CharSequenceAssert internal constructor(
135135
return this
136136
}
137137

138-
infix fun containsPattern(pattern: String): CharSequenceAssert {
138+
infix fun containsPattern(pattern: CharSequence): CharSequenceAssert {
139139
assertion.containsPattern(pattern)
140140
return this
141141
}

0 commit comments

Comments
 (0)