Add infix modifier to collections matchers
See original GitHub issueval found = repo.findAll()
found shouldContainExactly listOf("one", "two", "three")
//Before
fun <T, C : Collection<T>> C?.shouldContainExactly(expected: C) = this should containExactly(expected)
//After
infix fun <T, C : Collection<T>> C?.shouldContainExactly(expected: C) = this should containExactly(expected)
This is not applicable to vararg param functions due to limitation in language, but it would look better in for all collections matchers where it is possible.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Add infix modifier to arrow matchers · Issue #921 - GitHub
Hello, It would be nice to be able to use arrow matchers just like the rest of matchers in kotlintests.
Read more >Infix Functions in Kotlin - Baeldung
Make your Kotlin code easier to read through the use of infix functions. ... Kotlin is a language that adds many fresh features...
Read more >Kotlin Infix Notation - Make function calls more intuitive
Kotlin supports method calls of a special kind, called infix calls. ... the infix modifier to allow it to be called using infix...
Read more >Modifier - Android Developers
An ordered, immutable collection of modifier elements that decorate or add behavior to Compose UI elements. For example, backgrounds, padding and click ...
Read more >Should @infix and @mixin be soft modifiers? - #8 by arturopala ...
Isn't this category 1 “tighten or relax error checking or warnings, or customize error messages” ? In particular you placed @uncheckedStable in this ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
3.1.10 is released.
You’ll be waiting hours for that UI to update. Once it’s in the repo you’re good to go http://repo1.maven.org/maven2/io/kotlintest/kotlintest-assertions/
On Thu, 13 Sep 2018 at 09:23, Jens notifications@github.com wrote: