Arb.set with a range hangs the test if the given gen inside the set cannot produce enough values for the range
See original GitHub issueFound in Kotest version 4.3.2
Example
"test set of enum with less than 3 elements hangs" {
checkAll(Arb.set(Arb.enum<Enum>(), 1..3)) {
it shouldContain Enum.SingleValue
}
}
enum class Enum {
SingleValue // I also tried this with 2 elements in the enum and it hangs. 3 elements would not hang.
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Arb.set with a range hangs the test if the given gen inside the set ...
Arb.set with a range hangs the test if the given gen inside the set cannot produce enough values for the range.
Read more >Generators | Kotest
Kotest has two types of generators - Arb for generating arbitrary (random) values and Exhaustive for generating a finite set of values in...
Read more >California Exhaust Emission Standards and Test Procedured ...
“All-Electric Range Test” or “AERT” means a test sequence used to determine the range of an electric vehicle or of a hybrid electric...
Read more >Kotlin - Random numbers without repeating - Stack Overflow
with a medium size range of numbers, record the numbers you have picked, ... sort the values .sorted() // and collect them into...
Read more >Math208 Discrete Mathematics - College of Arts & Sciences
in the statement If I study, then I will pass the test, there is an assumed ... With a given predicate, there is...
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
+1 for the second opinion from me too. This is a kind of wrongly using the Arbs so I’d understand much quicker what’s going on with a exception. Similarly there is an exception when you have too many edge cases with too few iterations for your test. To me it is the same thing - just the other way around, too few options for the test to run. Thank you both.
@myuwono Do you want to add a PR for this? If not I will try to find time before I release 4.4 in the next two days.