Repository: willowtreeapps/assertk
Pull request #497 (2023-11-29 02:34:14)

Rename containsAll to containsAtLeast
This makes it more clear that the collection can contain additional elements
see: https://truth.dev/comparison

#495 


Patch:
diff --git a/assertk-coroutines/src/commonMain/kotlin/assertk/coroutines/assertions/flow.kt b/assertk-coroutines/src/commonMain/kotlin/assertk/coroutines/assertions/flow.kt
index 9af0b25..f323da5 100644
--- a/assertk-coroutines/src/commonMain/kotlin/assertk/coroutines/assertions/flow.kt
+++ b/assertk-coroutines/src/commonMain/kotlin/assertk/coroutines/assertions/flow.kt
@@ -72,7 +72,7 @@ suspend fun Assert<Flow<*>>.contains(element: Any?) = given { actual ->
 
 /**
  * Asserts the flow does not contain any of the expected elements. Fails as soon as that element is received.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 suspend fun Assert<Flow<*>>.doesNotContain(element: Any?) = given { actual ->
     val receivedElements = mutableListOf<Any?>()
@@ -92,7 +92,7 @@ suspend fun Assert<Flow<*>>.doesNotContain(element: Any?) = given { actual ->
 /**
  * Asserts the collection does not contain any of the expected elements. Fails as soon as one of the expected elements
  * is received.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 suspend fun Assert<Flow<*>>.containsNone(vararg elements: Any?) = given { actual ->
     val receivedElements = mutableListOf<Any?>()
@@ -114,13 +114,23 @@ suspend fun Assert<Flow<*>>.containsNone(vararg elements: Any?) = given { actual
 }
 
 /**
- * Asserts the flow emits all the expected elements, in any order. The flow may also
+ * Asserts the flow emits at least the expected elements, in any order. The flow may also
  * emit additional elements. Succeeds as soon as all expected elements are received.
  * @see [containsNone]
  * @see [containsExactly]
  * @see [containsOnly]
  */
-suspend fun Assert<Flow<*>>.containsAll(vararg elements: Any?) = given { actual ->
+@Deprecated("renamed to containsAtLeast", ReplaceWith("containsAtLeast(*elements)"))
+suspend fun Assert<Flow<*>>.containsAll(vararg elements: Any?) = containsAtLeast(*elements)
+
+/**
+ * Asserts the flow emits at least the expected elements, in any order. The flow may also
+ * emit additional elements. Succeeds as soon as all expected elements are received.
+ * @see [containsNone]
+ * @see [containsExactly]
+ * @see [containsOnly]
+ */
+suspend fun Assert<Flow<*>>.containsAtLeast(vararg elements: Any?) = given { actual ->
     val remainingElements = MutableList(elements.size) { index -> elements[index] }
     val receivedElements = mutableListOf<Any?>()
     try {
@@ -148,7 +158,7 @@ suspend fun Assert<Flow<*>>.containsAll(vararg elements: Any?) = given { actual
  * Asserts the flow contains only the expected elements, in any order.
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 suspend fun Assert<Flow<*>>.containsOnly(vararg elements: Any?) = given { actual ->
     val actualList = actual.toList()
@@ -170,7 +180,7 @@ suspend fun Assert<Flow<*>>.containsOnly(vararg elements: Any?) = given { actual
 /**
  * Asserts the flow contains exactly the expected elements. They must be in the same order and
  * there must not be any extra elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 suspend fun Assert<Flow<*>>.containsExactly(vararg elements: Any?) = given { actual ->
     val expected = elements.toList()
diff --git a/assertk/src/commonMain/kotlin/assertk/assertions/array.kt b/assertk/src/commonMain/kotlin/assertk/assertions/array.kt
index 39e3258..cd77701 100644
--- a/assertk/src/commonMain/kotlin/assertk/assertions/array.kt
+++ b/assertk/src/commonMain/kotlin/assertk/assertions/array.kt
@@ -99,7 +99,7 @@ fun Assert<Array<*>>.doesNotContain(element: Any?) = given { actual ->
 
 /**
  * Asserts the collection does not contain any of the expected elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 fun Assert<Array<*>>.containsNone(vararg elements: Any?) = given { actual ->
     if (elements.none { it in actual }) {
@@ -111,11 +111,19 @@ fun Assert<Array<*>>.containsNone(vararg elements: Any?) = given { actual ->
 }
 
 /**
- * Asserts the array contains all the expected elements, in any order. The array may also contain
+ * Asserts the array contains at least the expected elements, in any order. The array may also contain
  * additional elements.
  * @see [containsExactly]
  */
-fun Assert<Array<*>>.containsAll(vararg elements: Any?) = given { actual ->
+@Deprecated("renamed to containsAtLeast", ReplaceWith("containsAtLeast(*elements)"))
+fun Assert<Array<*>>.containsAll(vararg elements: Any?) = containsAtLeast(*elements)
+
+/**
+ * Asserts the array contains at least the expected elements, in any order. The array may also contain
+ * additional elements.
+ * @see [containsExactly]
+ */
+fun Assert<Array<*>>.containsAtLeast(vararg elements: Any?) = given { actual ->
     if (elements.all { actual.contains(it) }) return
     val notFound = elements.filterNot { it in actual }
     expected("to contain all:${show(elements)} but was:${show(actual)}\n elements not found:${show(notFound)}")
@@ -125,7 +133,7 @@ fun Assert<Array<*>>.containsAll(vararg elements: Any?) = given { actual ->
  * Asserts the array contains only the expected elements, in any order.
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 fun Assert<Array<*>>.containsOnly(vararg elements: Any?) = given { actual ->
     val notInActual = elements.filterNot { it in actual }
@@ -162,7 +170,7 @@ fun <T> Assert<Array<T>>.index(index: Int): Assert<T> =
 /**
  * Asserts the array contains exactly the expected elements. They must be in the same order and
  * there must not be any extra elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 fun Assert<Array<*>>.containsExactly(vararg elements: Any?) = given { actual ->
     if (actual.contentEquals(elements)) return
diff --git a/assertk/src/commonMain/kotlin/assertk/assertions/iterable.kt b/assertk/src/commonMain/kotlin/assertk/assertions/iterable.kt
index 9fd4f51..a1b775e 100644
--- a/assertk/src/commonMain/kotlin/assertk/assertions/iterable.kt
+++ b/assertk/src/commonMain/kotlin/assertk/assertions/iterable.kt
@@ -27,7 +27,7 @@ fun Assert<Iterable<*>>.doesNotContain(element: Any?) = given { actual ->
 
 /**
  * Asserts the iterable does not contain any of the expected elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 fun Assert<Iterable<*>>.containsNone(vararg elements: Any?) = given { actual ->
     val notExpected = elements.filter { it in actual }
@@ -38,13 +38,23 @@ fun Assert<Iterable<*>>.containsNone(vararg elements: Any?) = given { actual ->
 }
 
 /**
- * Asserts the iterable contains all the expected elements, in any order. The collection may also
+ * Asserts the iterable contains at least the expected elements, in any order. The collection may also
  * contain additional elements.
  * @see [containsNone]
  * @see [containsExactly]
  * @see [containsOnly]
  */
-fun Assert<Iterable<*>>.containsAll(vararg elements: Any?) = given { actual ->
+@Deprecated("renamed to containsAtLeast", ReplaceWith("containsAtLeast(*elements)"))
+fun Assert<Iterable<*>>.containsAll(vararg elements: Any?) = containsAtLeast(*elements)
+
+/**
+ * Asserts the iterable contains at least the expected elements, in any order. The collection may also
+ * contain additional elements.
+ * @see [containsNone]
+ * @see [containsExactly]
+ * @see [containsOnly]
+ */
+fun Assert<Iterable<*>>.containsAtLeast(vararg elements: Any?) = given { actual ->
     val notFound = elements.filterNot { it in actual }
     if (notFound.isEmpty()) {
         return
@@ -62,7 +72,7 @@ fun Assert<Iterable<*>>.containsAll(vararg elements: Any?) = given { actual ->
  *
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsExactlyInAnyOrder]
  */
 fun Assert<Iterable<*>>.containsOnly(vararg elements: Any?) = given { actual ->
@@ -91,7 +101,7 @@ fun Assert<Iterable<*>>.containsOnly(vararg elements: Any?) = given { actual ->
  *
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsOnly]
  */
 fun Assert<Iterable<*>>.containsExactlyInAnyOrder(vararg elements: Any?) = given { actual ->
diff --git a/assertk/src/commonMain/kotlin/assertk/assertions/list.kt b/assertk/src/commonMain/kotlin/assertk/assertions/list.kt
index c53de91..0b7bc7a 100644
--- a/assertk/src/commonMain/kotlin/assertk/assertions/list.kt
+++ b/assertk/src/commonMain/kotlin/assertk/assertions/list.kt
@@ -30,7 +30,7 @@ fun <T> Assert<List<T>>.index(index: Int): Assert<T> =
  * [1, 2, 2] containsExactly [2, 1] fails
  * [1, 2] containsExactly [1, 2, 2] fails
  *
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsOnly]
  * @see [containsExactlyInAnyOrder]
  */
diff --git a/assertk/src/commonMain/kotlin/assertk/assertions/map.kt b/assertk/src/commonMain/kotlin/assertk/assertions/map.kt
index 8920803..63e93b1 100644
--- a/assertk/src/commonMain/kotlin/assertk/assertions/map.kt
+++ b/assertk/src/commonMain/kotlin/assertk/assertions/map.kt
@@ -75,11 +75,19 @@ fun <K, V> Assert<Map<K, V>>.contains(element: Pair<K, V>) {
 }
 
 /**
- * Asserts the map contains all the expected elements. The map may also contain additional elements.
+ * Asserts the map contains at least the expected elements. The map may also contain additional elements.
  * @see [containsNone]
  * @see [containsExactly]
  */
-fun <K, V> Assert<Map<K, V>>.containsAll(vararg elements: Pair<K, V>) = given { actual ->
+@Deprecated("renamed to containsAtLeast", ReplaceWith("containsAtLeast(*elements)"))
+fun <K, V> Assert<Map<K, V>>.containsAll(vararg elements: Pair<K, V>) = containsAtLeast(*elements)
+
+/**
+ * Asserts the map contains at least the expected elements. The map may also contain additional elements.
+ * @see [containsNone]
+ * @see [containsExactly]
+ */
+fun <K, V> Assert<Map<K, V>>.containsAtLeast(vararg elements: Pair<K, V>) = given { actual ->
     if (elements.all { (k, v) -> actual.containsKey(k) && actual[k] == v }) {
         return
     }
@@ -109,7 +117,7 @@ fun <K, V> Assert<Map<K, V>>.doesNotContain(element: Pair<K, V>) {
 
 /**
  * Asserts the map does not contain any of the expected elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 fun <K, V> Assert<Map<K, V>>.containsNone(vararg elements: Pair<K, V>) = given { actual ->
     if (elements.all { (k, v) -> !actual.containsKey(k) || actual[k] != v }) return
@@ -123,7 +131,7 @@ fun <K, V> Assert<Map<K, V>>.containsNone(vararg elements: Pair<K, V>) = given {
 
 /**
  * Asserts the map contains only the expected elements. There must not be any extra elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 fun <K, V> Assert<Map<K, V>>.containsOnly(vararg elements: Pair<K, V>) = given { actual ->
     val elementMap = elements.toMap()
diff --git a/assertk/src/commonMain/kotlin/assertk/assertions/sequence.kt b/assertk/src/commonMain/kotlin/assertk/assertions/sequence.kt
index a49dd80..346aedc 100644
--- a/assertk/src/commonMain/kotlin/assertk/assertions/sequence.kt
+++ b/assertk/src/commonMain/kotlin/assertk/assertions/sequence.kt
@@ -30,7 +30,7 @@ fun Assert<Sequence<*>>.doesNotContain(element: Any?) = given { actual ->
 
 /**
  * Asserts the sequence does not contain any of the expected elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 fun Assert<Sequence<*>>.containsNone(vararg elements: Any?) = given { actual ->
     val actualList = actual.toList()
@@ -42,13 +42,23 @@ fun Assert<Sequence<*>>.containsNone(vararg elements: Any?) = given { actual ->
 }
 
 /**
- * Asserts the sequence contains all the expected elements, in any order. The collection may also
+ * Asserts the sequence contains at least the expected elements, in any order. The collection may also
  * contain additional elements.
  * @see [containsNone]
  * @see [containsExactly]
  * @see [containsOnly]
  */
-fun Assert<Sequence<*>>.containsAll(vararg elements: Any?) = given { actual ->
+@Deprecated("renamed to containsAtLeast", ReplaceWith("containsAtLeast(*elements)"))
+fun Assert<Sequence<*>>.containsAll(vararg elements: Any?) = containsAtLeast(*elements)
+
+/**
+ * Asserts the sequence contains at least the expected elements, in any order. The collection may also
+ * contain additional elements.
+ * @see [containsNone]
+ * @see [containsExactly]
+ * @see [containsOnly]
+ */
+fun Assert<Sequence<*>>.containsAtLeast(vararg elements: Any?) = given { actual ->
     val actualList = actual.toList()
     val notFound = elements.filterNot { it in actualList }
     if (notFound.isEmpty()) {
@@ -67,7 +77,7 @@ fun Assert<Sequence<*>>.containsAll(vararg elements: Any?) = given { actual ->
  *
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsExactlyInAnyOrder]
  */
 fun Assert<Sequence<*>>.containsOnly(vararg elements: Any?) = given { actual ->
@@ -95,7 +105,7 @@ fun Assert<Sequence<*>>.containsOnly(vararg elements: Any?) = given { actual ->
  * [1, 2, 2] containsExactly [2, 1] fails
  * [1, 2] containsExactly [1, 2, 2] fails
  *
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsOnly]
  * @see [containsExactlyInAnyOrder]
  */
@@ -116,7 +126,7 @@ fun Assert<Sequence<*>>.containsExactly(vararg elements: Any?) = given { actual
  *
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsOnly]
  */
 fun Assert<Sequence<*>>.containsExactlyInAnyOrder(vararg elements: Any?) = given { actual ->
diff --git a/assertk/src/template/assertk/assertions/floatArrayContains.kt b/assertk/src/template/assertk/assertions/floatArrayContains.kt
index 382f4ed..a98647e 100644
--- a/assertk/src/template/assertk/assertions/floatArrayContains.kt
+++ b/assertk/src/template/assertk/assertions/floatArrayContains.kt
@@ -33,7 +33,7 @@ fun Assert<$T>.doesNotContain(element: $E) = given { actual ->
 
 /**
  * Asserts the $T does not contain any of the expected elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 fun Assert<$T>.containsNone(vararg elements: $E) = given { actual ->
     val actualList = actual.asList()
@@ -46,12 +46,21 @@ fun Assert<$T>.containsNone(vararg elements: $E) = given { actual ->
 }
 
 /**
- * Asserts the $T contains all the expected elements, in any order. The array may also contain
+ * Asserts the $T contains at least the expected elements, in any order. The array may also contain
  * additional elements.
  * @see [containsExactly]
  */
-@JvmName("$NContainsAll")
-fun Assert<$T>.containsAll(vararg elements: $E) = given { actual ->
+@JvmName("$NcontainsAll")
+@Deprecated("renamed to containsAtLeast", ReplaceWith("containsAtLeast(*elements)"))
+fun Assert<$T>.containsAll(vararg elements: $E) = containsAtLeast(*elements)
+
+/**
+ * Asserts the $T contains at least the expected elements, in any order. The array may also contain
+ * additional elements.
+ * @see [containsExactly]
+ */
+@JvmName("$NcontainsAtLeast")
+fun Assert<$T>.containsAtLeast(vararg elements: $E) = given { actual ->
     val actualList =  actual.asList()
     val elementsList = elements.asList()
     if (elementsList.all { actualList.contains(it) }) return
@@ -69,7 +78,7 @@ fun Assert<$T>.containsAll(vararg elements: $E) = given { actual ->
  *
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsExactlyInAnyOrder]
  */
 fun Assert<$T>.containsOnly(vararg elements: $E) = given { actual ->
@@ -98,7 +107,7 @@ fun Assert<$T>.containsOnly(vararg elements: $E) = given { actual ->
  * [1, 2, 2] containsOnly [2, 1] fails
  * [1, 2] containsOnly [2, 2, 1] fails
  *
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 @JvmName("$NContainsExactly")
 fun Assert<$T>.containsExactly(vararg elements: $E) = given { actual ->
@@ -119,7 +128,7 @@ fun Assert<$T>.containsExactly(vararg elements: $E) = given { actual ->
  *
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsOnly]
  */
 @JvmName("$NContainsExactlyInAnyOrder")
diff --git a/assertk/src/template/assertk/assertions/primativeArrayContains.kt b/assertk/src/template/assertk/assertions/primativeArrayContains.kt
index 83d7627..07fa2fa 100644
--- a/assertk/src/template/assertk/assertions/primativeArrayContains.kt
+++ b/assertk/src/template/assertk/assertions/primativeArrayContains.kt
@@ -45,7 +45,7 @@ fun Assert<$T>.doesNotContain(element: $E) = given { actual ->
 
 /**
  * Asserts the $T does not contain any of the expected elements.
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 $A
 fun Assert<$T>.containsNone(vararg elements: $E) = given { actual ->
@@ -58,13 +58,23 @@ fun Assert<$T>.containsNone(vararg elements: $E) = given { actual ->
 }
 
 /**
- * Asserts the $T contains all the expected elements, in any order. The array may also contain
+ * Asserts the $T contains at least the expected elements, in any order. The array may also contain
  * additional elements.
  * @see [containsExactly]
  */
-@JvmName("$NContainsAll")
+@JvmName("$NcontainsAll")
+@Deprecated("renamed to containsAtLeast", ReplaceWith("containsAtLeast(*elements)"))
 $A
-fun Assert<$T>.containsAll(vararg elements: $E) = given { actual ->
+fun Assert<$T>.containsAll(vararg elements: $E) = containsAtLeast(*elements)
+
+/**
+ * Asserts the $T contains at least the expected elements, in any order. The array may also contain
+ * additional elements.
+ * @see [containsExactly]
+ */
+@JvmName("$NcontainsAtLeast")
+$A
+fun Assert<$T>.containsAtLeast(vararg elements: $E) = given { actual ->
     if (elements.all { actual.contains(it) }) return
     val notFound = elements.filterNot { it in actual }
     expected("to contain all:${show(elements)} but was:${show(actual)}\n elements not found:${show(notFound)}")
@@ -80,7 +90,7 @@ fun Assert<$T>.containsAll(vararg elements: $E) = given { actual ->
  *
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 $A
 fun Assert<$T>.containsOnly(vararg elements: $E) = given { actual ->
@@ -107,7 +117,7 @@ fun Assert<$T>.containsOnly(vararg elements: $E) = given { actual ->
  * [1, 2, 2] containsOnly [2, 1] fails
  * [1, 2] containsOnly [2, 2, 1] fails
  *
- * @see [containsAll]
+ * @see [containsAtLeast]
  */
 @JvmName("$NContainsExactly")
 $A
@@ -127,7 +137,7 @@ fun Assert<$T>.containsExactly(vararg elements: $E) = given { actual ->
  *
  * @see [containsNone]
  * @see [containsExactly]
- * @see [containsAll]
+ * @see [containsAtLeast]
  * @see [containsOnly]
  */
 @JvmName("$NContainsExactlyInAnyOrder")


Test patch:
diff --git a/assertk-coroutines/src/commonTest/kotlin/test/assertk/coroutines/assertions/FlowTest.kt b/assertk-coroutines/src/commonTest/kotlin/test/assertk/coroutines/assertions/FlowTest.kt
index 54b6de3..9f8983e 100644
--- a/assertk-coroutines/src/commonTest/kotlin/test/assertk/coroutines/assertions/FlowTest.kt
+++ b/assertk-coroutines/src/commonTest/kotlin/test/assertk/coroutines/assertions/FlowTest.kt
@@ -124,18 +124,18 @@ class FlowTest {
     }
     //region
 
-    //region containsAll
-    @Test fun containsAll_all_elements_passes() = runTest {
-        assertThat(flowOf(1, 2)).containsAll(2, 1)
+    //region containsAtLeast
+    @Test fun containsAtLeast_all_elements_passes() = runTest {
+        assertThat(flowOf(1, 2)).containsAtLeast(2, 1)
     }
 
-    @Test fun containsAll_all_elements_in_flow_that_doesnt_complete_passes() = runTest {
-        assertThat(nonCompletingFlowOf(1, 2)).containsAll(2, 1)
+    @Test fun containsAtLeast_all_elements_in_flow_that_doesnt_complete_passes() = runTest {
+        assertThat(nonCompletingFlowOf(1, 2)).containsAtLeast(2, 1)
     }
 
-    @Test fun containsAll_some_elements_fails() = runTest {
+    @Test fun containsAtLeast_some_elements_fails() = runTest {
         val error = assertFailsWith<AssertionError> {
-            assertThat(flowOf(1)).containsAll(1, 2)
+            assertThat(flowOf(1)).containsAtLeast(1, 2)
         }
         assertEquals(
             """expected to contain all:<[1, 2]> but received:<[1]>
diff --git a/assertk/src/commonTest/kotlin/test/assertk/assertions/ArrayTest.kt b/assertk/src/commonTest/kotlin/test/assertk/assertions/ArrayTest.kt
index c48af09..fee171a 100644
--- a/assertk/src/commonTest/kotlin/test/assertk/assertions/ArrayTest.kt
+++ b/assertk/src/commonTest/kotlin/test/assertk/assertions/ArrayTest.kt
@@ -146,18 +146,18 @@ class ArrayTest {
     }
     //region
 
-    //region containsAll
-    @Test fun containsAll_all_elements_passes() {
-        assertThat(arrayOf(1, 2)).containsAll(2, 1)
+    //region containsAtLeast
+    @Test fun containsAtLeast_all_elements_passes() {
+        assertThat(arrayOf(1, 2)).containsAtLeast(2, 1)
     }
 
-    @Test fun containsAll_extra_elements_passes() {
-        assertThat(arrayOf(1, 2, 3)).containsAll(1, 2)
+    @Test fun containsAtLeast_extra_elements_passes() {
+        assertThat(arrayOf(1, 2, 3)).containsAtLeast(1, 2)
     }
 
-    @Test fun containsAll_some_elements_fails() {
+    @Test fun containsAtLeast_some_elements_fails() {
         val error = assertFailsWith<AssertionError> {
-            assertThat(arrayOf(1)).containsAll(1, 2)
+            assertThat(arrayOf(1)).containsAtLeast(1, 2)
         }
         assertEquals(
             """expected to contain all:<[1, 2]> but was:<[1]>
diff --git a/assertk/src/commonTest/kotlin/test/assertk/assertions/IterableTest.kt b/assertk/src/commonTest/kotlin/test/assertk/assertions/IterableTest.kt
index 390a377..fb57146 100644
--- a/assertk/src/commonTest/kotlin/test/assertk/assertions/IterableTest.kt
+++ b/assertk/src/commonTest/kotlin/test/assertk/assertions/IterableTest.kt
@@ -6,7 +6,7 @@ import assertk.assertions.any
 import assertk.assertions.atLeast
 import assertk.assertions.atMost
 import assertk.assertions.contains
-import assertk.assertions.containsAll
+import assertk.assertions.containsAtLeast
 import assertk.assertions.containsExactly
 import assertk.assertions.containsExactlyInAnyOrder
 import assertk.assertions.containsNone
@@ -73,14 +73,14 @@ class IterableTest {
     }
     //region
 
-    //region containsAll
-    @Test fun containsAll_all_elements_passes() {
-        assertThat(iterableOf(1, 2)).containsAll(2, 1)
+    //region containsAtLeast
+    @Test fun containsAtLeast_all_elements_passes() {
+        assertThat(iterableOf(1, 2)).containsAtLeast(2, 1)
     }
 
-    @Test fun containsAll_some_elements_fails() {
+    @Test fun containsAtLeast_some_elements_fails() {
         val error = assertFailsWith<AssertionError> {
-            assertThat(iterableOf(1)).containsAll(1, 2)
+            assertThat(iterableOf(1)).containsAtLeast(1, 2)
         }
         assertEquals(
             """expected to contain all:<[1, 2]> but was:<[1]>
diff --git a/assertk/src/commonTest/kotlin/test/assertk/assertions/MapTest.kt b/assertk/src/commonTest/kotlin/test/assertk/assertions/MapTest.kt
index 96a814f..8f55f23 100644
--- a/assertk/src/commonTest/kotlin/test/assertk/assertions/MapTest.kt
+++ b/assertk/src/commonTest/kotlin/test/assertk/assertions/MapTest.kt
@@ -66,18 +66,18 @@ class MapTest {
     }
     //region
 
-    //region containsAll
-    @Test fun containsAll_all_elements_passes() {
-        assertThat(mapOf("one" to 1, "two" to 2)).containsAll("two" to 2, "one" to 1)
+    //region containsAtLeast
+    @Test fun containsAtLeast_all_elements_passes() {
+        assertThat(mapOf("one" to 1, "two" to 2)).containsAtLeast("two" to 2, "one" to 1)
     }
 
-    @Test fun containsAll_extra_elements_passes() {
-        assertThat(mapOf("one" to 1, "two" to 2, "three" to 3)).containsAll("one" to 1, "two" to 2)
+    @Test fun containsAtLeast_extra_elements_passes() {
+        assertThat(mapOf("one" to 1, "two" to 2, "three" to 3)).containsAtLeast("one" to 1, "two" to 2)
     }
 
-    @Test fun containsAll_swapped_keys_and_values_fails() {
+    @Test fun containsAtLeast_swapped_keys_and_values_fails() {
         val error = assertFailsWith<AssertionError> {
-            assertThat(mapOf("one" to 2, "two" to 1)).containsAll("two" to 2, "one" to 1)
+            assertThat(mapOf("one" to 2, "two" to 1)).containsAtLeast("two" to 2, "one" to 1)
         }
 
         assertEquals(
@@ -87,9 +87,9 @@ class MapTest {
         )
     }
 
-    @Test fun containsAll_nullable_values_fails() {
+    @Test fun containsAtLeast_nullable_values_fails() {
         val error = assertFailsWith<AssertionError> {
-            assertThat(mapOf<String, Any?>()).containsAll("key" to null)
+            assertThat(mapOf<String, Any?>()).containsAtLeast("key" to null)
         }
         assertEquals(
                 """expected to contain all:<{"key"=null}> but was:<{}>
@@ -98,9 +98,9 @@ class MapTest {
         )
     }
 
-    @Test fun containsAll_some_elements_fails() {
+    @Test fun containsAtLeast_some_elements_fails() {
         val error = assertFailsWith<AssertionError> {
-            assertThat(mapOf("one" to 1)).containsAll("one" to 1, "two" to 2)
+            assertThat(mapOf("one" to 1)).containsAtLeast("one" to 1, "two" to 2)
         }
         assertEquals(
             """expected to contain all:<{"one"=1, "two"=2}> but was:<{"one"=1}>
diff --git a/assertk/src/commonTest/kotlin/test/assertk/assertions/SequenceTest.kt b/assertk/src/commonTest/kotlin/test/assertk/assertions/SequenceTest.kt
index e56bea7..b12e03c 100644
--- a/assertk/src/commonTest/kotlin/test/assertk/assertions/SequenceTest.kt
+++ b/assertk/src/commonTest/kotlin/test/assertk/assertions/SequenceTest.kt
@@ -6,7 +6,7 @@ import assertk.assertions.any
 import assertk.assertions.atLeast
 import assertk.assertions.atMost
 import assertk.assertions.contains
-import assertk.assertions.containsAll
+import assertk.assertions.containsAtLeast
 import assertk.assertions.containsExactly
 import assertk.assertions.containsExactlyInAnyOrder
 import assertk.assertions.containsNone
@@ -94,18 +94,18 @@ class SequenceTest {
     }
     //region
 
-    //region containsAll
-    @Test fun containsAll_all_elements_passes() {
-        assertThat(sequenceOf(1, 2)).containsAll(2, 1)
+    //region containsAtLeast
+    @Test fun containsAtLeast_all_elements_passes() {
+        assertThat(sequenceOf(1, 2)).containsAtLeast(2, 1)
     }
 
-    @Test fun containsAll_oneshot_passes() {
-        assertThat(oneshotSequenceOf(1, 2)).containsAll(2, 1)
+    @Test fun containsAtLeast_oneshot_passes() {
+        assertThat(oneshotSequenceOf(1, 2)).containsAtLeast(2, 1)
     }
 
-    @Test fun containsAll_some_elements_fails() {
+    @Test fun containsAtLeast_some_elements_fails() {
         val error = assertFailsWith<AssertionError> {
-            assertThat(sequenceOf(1)).containsAll(1, 2)
+            assertThat(sequenceOf(1)).containsAtLeast(1, 2)
         }
         assertEquals(
             """expected to contain all:<[1, 2]> but was:<[1]>
diff --git a/assertk/src/testTemplate/test/assertk/assertions/FloatArrayContainsTest.kt b/assertk/src/testTemplate/test/assertk/assertions/FloatArrayContainsTest.kt
index 025e06c..db48930 100644
--- a/assertk/src/testTemplate/test/assertk/assertions/FloatArrayContainsTest.kt
+++ b/assertk/src/testTemplate/test/assertk/assertions/FloatArrayContainsTest.kt
@@ -65,14 +65,14 @@ class $TContainsTest {
     }
     //region
 
-    //region containsAll
-    @Test fun containsAll_all_elements_passes() {
-        assertThat($NOf(1.to$E(), 2.to$E())).containsAll(2.to$E(), 1.to$E())
+    //region containsAtLeast
+    @Test fun containsAtLeast_all_elements_passes() {
+        assertThat($NOf(1.to$E(), 2.to$E())).containsAtLeast(2.to$E(), 1.to$E())
     }
 
-    @Test fun containsAll_some_elements_fails() {
+    @Test fun containsAtLeast_some_elements_fails() {
         val error = assertFailsWith<AssertionError> {
-            assertThat($NOf(1.to$E())).containsAll(1.to$E(), 2.to$E())
+            assertThat($NOf(1.to$E())).containsAtLeast(1.to$E(), 2.to$E())
         }
         assertEquals(
             """expected to contain all:<[${show(1.to$E(), "")}, ${show(2.to$E(), "")}]> but was:<[${show(1.to$E(), "")}]>
diff --git a/assertk/src/testTemplate/test/assertk/assertions/PrimativeArrayContainsTest.kt b/assertk/src/testTemplate/test/assertk/assertions/PrimativeArrayContainsTest.kt
index f6581b1..6abf402 100644
--- a/assertk/src/testTemplate/test/assertk/assertions/PrimativeArrayContainsTest.kt
+++ b/assertk/src/testTemplate/test/assertk/assertions/PrimativeArrayContainsTest.kt
@@ -65,14 +65,14 @@ class $TContainsTest {
     }
     //region
 
-    //region containsAll
-    @Test fun containsAll_all_elements_passes() {
-        assertThat($NOf(1.to$E(), 2.to$E())).containsAll(2.to$E(), 1.to$E())
+    //region containsAtLeast
+    @Test fun containsAtLeast_all_elements_passes() {
+        assertThat($NOf(1.to$E(), 2.to$E())).containsAtLeast(2.to$E(), 1.to$E())
     }
 
-    @Test fun containsAll_some_elements_fails() {
+    @Test fun containsAtLeast_some_elements_fails() {
         val error = assertFailsWith<AssertionError> {
-            assertThat($NOf(1.to$E())).containsAll(1.to$E(), 2.to$E())
+            assertThat($NOf(1.to$E())).containsAtLeast(1.to$E(), 2.to$E())
         }
         assertEquals(
             """expected to contain all:<[${show(1.to$E(), "")}, ${show(2.to$E(), "")}]> but was:<[${show(1.to$E(), "")}]>