Comments (2)
I think we should deprecate the method accepting the custom verifier. I think it's a bit problematic in this method.. My reasoning is as follows..
Given a custom verifier, there's no guarantees that the equality implementation is associative. Normally A == B
and B == C
implies that A == C
. That might not be the case depending on how a user implements their verifier. This becomes a problem when implementing containsExactlyInAnyOrder
.
When associativity applies, we can simply find any match to an element and it's equally fine to "consume" that match and move on and check if the rest of the elements manage to find a match. If all elements find a match, the assertion is a success.
Without associativity, we need to test every permutation of pairing the elements of the lists, otherwise we might end up with a false negative assertion.
from kotest.
Just noticed that this duplicates #3820 and a PR to fix it in #3821.. Will review that and contemplate for a bit.
from kotest.
Related Issues (20)
- SpecSystemExitListener uses a terminally deprecated method in `java.lang.System` HOT 4
- Don't deprecate non-smart-cast-based version of shouldBeInstanceOf
- shouldContainExactly does not support new JDK 21 SequencedSet/SequencedCollection abstractions HOT 2
- Gradle plugin `io.kotest.multiplatform` breaks project configuration HOT 2
- JVM Tests fail to run on JDK 21 when System Properties are propagated in Gradle
- Kotest doesn't work with GraalVM 's tracing agent HOT 1
- Kotest doesn't compare JAXBElement properly HOT 1
- Outdated badges in docs showing old snapshot version v5.6.0...-SNAPSHOT HOT 2
- Generator created by Arb.distinct() may still return duplicates if those come from edge cases
- TestNG runner support HOT 3
- Include the thrown exception when short-circuiting
- Plugin for Kotlin Multiplatform does not work with 5.8.0 HOT 1
- Defect Localization: ability to specify test dependencies HOT 4
- withData in StringSpec tests HOT 7
- LocalDate generator values are missing maxDate HOT 3
- shouldContain does not offer "Click to see difference" HOT 2
- Arb.localDate(LocalDate.MIN, LocalDate.MAX) fails
- Private Test Classes HOT 2
- shouldBeEqualToComparingFields breaks with a typealias of a Java type HOT 2
- containAllInAnyOrder fails to detect mismatch in element counts, as long as the overall counts of elements match HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotest.