Skip to content

Commit 59a43f7

Browse files
ckettievant
authored andcommitted
Fix code samples in KDoc comments
1 parent 5ff8a09 commit 59a43f7

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

assertk/src/commonMain/kotlin/assertk/assertions/iterable.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ fun <E> Assert<Iterable<E>>.none(f: (Assert<E>) -> Unit) =
224224
* The given lambda will be run for each item.
225225
*
226226
* ```
227-
* assert(listOf(-1, 1, 2)).atLeast(2) { it.isPositive() }
227+
* assertThat(listOf(-1, 1, 2)).atLeast(2) { it.isPositive() }
228228
* ```
229229
*/
230230
fun <E, T : Iterable<E>> Assert<T>.atLeast(times: Int, f: (Assert<E>) -> Unit) =
@@ -239,7 +239,7 @@ fun <E, T : Iterable<E>> Assert<T>.atLeast(times: Int, f: (Assert<E>) -> Unit) =
239239
* The given lambda will be run for each item.
240240
*
241241
* ```
242-
* assert(listOf(-2, -1, 1)).atMost(2) { it.isPositive() }
242+
* assertThat(listOf(-2, -1, 1)).atMost(2) { it.isPositive() }
243243
* ```
244244
*/
245245
fun <E, T : Iterable<E>> Assert<T>.atMost(times: Int, f: (Assert<E>) -> Unit) =
@@ -254,7 +254,7 @@ fun <E, T : Iterable<E>> Assert<T>.atMost(times: Int, f: (Assert<E>) -> Unit) =
254254
* The given lambda will be run for each item.
255255
*
256256
* ```
257-
* assert(listOf(-1, 1, 2)).exactly(2) { it.isPositive() }
257+
* assertThat(listOf(-1, 1, 2)).exactly(2) { it.isPositive() }
258258
* ```
259259
*/
260260
fun <E, T : Iterable<E>> Assert<T>.exactly(times: Int, f: (Assert<E>) -> Unit) =
@@ -269,7 +269,7 @@ fun <E, T : Iterable<E>> Assert<T>.exactly(times: Int, f: (Assert<E>) -> Unit) =
269269
* The given lambda will be run for each item.
270270
*
271271
* ```
272-
* assert(listOf(-1, -2, 1)).any { it.isPositive() }
272+
* assertThat(listOf(-1, -2, 1)).any { it.isPositive() }
273273
* ```
274274
*/
275275
fun <E, T : Iterable<E>> Assert<T>.any(f: (Assert<E>) -> Unit) =
@@ -330,4 +330,4 @@ fun <E, T : Iterable<E>> Assert<T>.single(): Assert<E> {
330330
expected("to have single element but was empty")
331331
}
332332
}
333-
}
333+
}

assertk/src/commonMain/kotlin/assertk/assertions/predicate.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import assertk.assertions.support.expected
88
*
99
* ```
1010
* val divisibleBy5 : (Int) -> Boolean = { it % 5 == 0 }
11-
* assert(10).matchesPredicate(divisibleBy5)
11+
* assertThat(10).matchesPredicate(divisibleBy5)
1212
* ```
1313
*/
1414
fun <T> Assert<T>.matchesPredicate(f: (T) -> Boolean) = given { actual ->

assertk/src/commonMain/kotlin/assertk/assertions/sequence.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ fun <E> Assert<Sequence<E>>.none(f: (Assert<E>) -> Unit) =
245245
* The given lambda will be run for each item.
246246
*
247247
* ```
248-
* assert(sequenceOf(-1, 1, 2)).atLeast(2) { it.isPositive() }
248+
* assertThat(sequenceOf(-1, 1, 2)).atLeast(2) { it.isPositive() }
249249
* ```
250250
*/
251251
fun <E, T : Sequence<E>> Assert<T>.atLeast(times: Int, f: (Assert<E>) -> Unit) =
@@ -260,7 +260,7 @@ fun <E, T : Sequence<E>> Assert<T>.atLeast(times: Int, f: (Assert<E>) -> Unit) =
260260
* The given lambda will be run for each item.
261261
*
262262
* ```
263-
* assert(sequenceOf(-2, -1, 1)).atMost(2) { it.isPositive() }
263+
* assertThat(sequenceOf(-2, -1, 1)).atMost(2) { it.isPositive() }
264264
* ```
265265
*/
266266
fun <E, T : Sequence<E>> Assert<T>.atMost(times: Int, f: (Assert<E>) -> Unit) =
@@ -275,7 +275,7 @@ fun <E, T : Sequence<E>> Assert<T>.atMost(times: Int, f: (Assert<E>) -> Unit) =
275275
* The given lambda will be run for each item.
276276
*
277277
* ```
278-
* assert(sequenceOf(-1, 1, 2)).exactly(2) { it.isPositive() }
278+
* assertThat(sequenceOf(-1, 1, 2)).exactly(2) { it.isPositive() }
279279
* ```
280280
*/
281281
fun <E, T : Sequence<E>> Assert<T>.exactly(times: Int, f: (Assert<E>) -> Unit) =
@@ -290,7 +290,7 @@ fun <E, T : Sequence<E>> Assert<T>.exactly(times: Int, f: (Assert<E>) -> Unit) =
290290
* The given lambda will be run for each item.
291291
*
292292
* ```
293-
* assert(sequenceOf(-1, -2, 1)).any { it.isPositive() }
293+
* assertThat(sequenceOf(-1, -2, 1)).any { it.isPositive() }
294294
* ```
295295
*/
296296
fun <E, T : Sequence<E>> Assert<T>.any(f: (Assert<E>) -> Unit) =

0 commit comments

Comments
 (0)