question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add infix modifier to collections matchers

See original GitHub issue
val 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:closed
  • Created 5 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
sksamuelcommented, Sep 13, 2018

3.1.10 is released.

1reaction
sksamuelcommented, Sep 13, 2018

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:

Hitting refresh button at

https://search.maven.org/search?q=g:io.kotlintest AND a:kotlintest-assertions AND v:3.1.10 😁

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kotlintest/kotlintest/issues/404#issuecomment-420925202, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtZGv20HWBFBdtH3GVu7TEObaj7RPK_ks5uahYAgaJpZM4WlMj7 .

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found