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 arb that generates lists

See original GitHub issue

Proposal to add a property test arb that generates lists of values.

Proposed API

fun <A> Arb<A>.chunked(size: IntRange): Arb<List<A>>
fun <A> Arb<A>.chunked(minSize: Int, maxSize: Int): Arb<List<A>>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
sksamuelcommented, Mar 3, 2020

@sksamuel I did not see that method. Thank you for pointing it out.

Is this (and list) something that could or should be added to Gen rather than Arb? It’s not entirely clear to me when a method should be added to Arb vs Gen, but this seems like something that would fit on Gen.

I am thinking about tweaking the interfaces for beta2 and having Gen just be a marker interface with no methods. @Kerooker suggested this a while ago because at the moment the Exhaustive interface doesn’t really do much other than be a marker itself.

0reactions
sksamuelcommented, Mar 16, 2020

I am closing this as the PR is up and it is unrelated to this now completed ticket.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I ensure that Arb set or Arb list generates unique e
So far, all I see is making a mutable set to store all currently generated values, and add to it in the filter...
Read more >
Add Arb.distinct that will terminate · Issue #2262 - GitHub
Let's say I write a test that generates short Strings. I'm testing something stateful, so I want to make sure the generated values...
Read more >
Tutorial 2: Sequence alignments using ARB
Note: ARB recommends generating new short names, and this is especially important if you ... Add species: adds species to the HITLIST that...
Read more >
Compliance Instrument Tracking System Service (CITSS ...
Per the Cap-and-Trade Regulation, CARB can create a Consolidated Entity Account (CEA) for entities that have multiple facilities participating in the California ...
Read more >
ARB/SILVA FAQs
To add a single sequence to your list works in the same way. ... shown in the List field below the browser; To...
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