Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds containsExactlyInAnyOrder to iterable and primitive / float arrays. #316

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

Kritarie
Copy link
Contributor

No description provided.

@@ -73,6 +74,40 @@ fun Assert<Iterable<*>>.containsOnly(vararg elements: Any?) = given { actual ->
}.toString())
}

/**
* Asserts the iterable contains exactly the expected elements, in any order.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this doc could be more descriptive in describing the different between this and the other contains methods.

}.toString())
}

internal fun MutableList<*>.removeFirst(value: Any?) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this isn't private?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, it should be private

@Kritarie Kritarie force-pushed the contains-exactly-in-any-order branch from d299288 to e4f3c19 Compare September 1, 2020 18:11
@Kritarie Kritarie force-pushed the contains-exactly-in-any-order branch from e4f3c19 to 31d69f6 Compare September 1, 2020 18:58
@Kritarie Kritarie merged commit d822528 into main Sep 1, 2020
@Kritarie Kritarie deleted the contains-exactly-in-any-order branch September 1, 2020 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants