Johannes Link

Results 390 comments of Johannes Link

@lmartelli I assume you haven't found a viable solution. Feel free to re-open if I'm wrong.

I need more time for analysis to see if I want jqwik to go that route. As other PBT libs - eg hypothesis for Python - show, the underlying stream...

Would you be able to specify what _negated_ behaviour is in the general case? Even if I look at your supposedly obvious (?) example, some questions arise about what is...

Thinking of implementation: I can imagine this to work for arbitraries of the same kind, e.g. `stringArbitrary.except(anotherStringArbitrary)` or `integerArbitrary.except(otherIntegerArbitrary)` But as soon as there's a generic thing involved, like filtering,...

The big problem from an implementation side is that there is no _generic_ way to determine if an object of type `T` could potentially be generated by an arbitrary of...

I haven't gone through your problem in detail (yet). Have you looked at [`ListArbitrary.mapEach(..)`](https://jqwik.net/docs/1.7.2/javadoc/net/jqwik/api/arbitraries/ListArbitrary.html#mapEach(java.util.function.BiFunction)) and [`ListArbitrary.flatMapEach(..)`](https://jqwik.net/docs/1.7.2/javadoc/net/jqwik/api/arbitraries/ListArbitrary.html#flatMapEach(java.util.function.BiFunction))?

A somewhat simpler example using `flatMapEach` for what I think you want to do: ```java @Property(tries = 10) void addAgesToFixedListOfUsers(@ForAll("users") List users) { System.out.println(users); // Assertions.assertThat(users).hasSize(1); } @Provide Arbitrary users()...

First impulse: Changing the existing default behaviour would make a lot of existing properties much weaker, without people being aware of that. You're probably aware that `StringArbitrary.ascii()` configures string generators...

Regexes for string generation has been on the list for a long time: https://github.com/jlink/jqwik/issues/68. I haven’t had a use case for it myself, and implementation is not trivial, so priority...

> @lmartelli Did you try solving it with a provider? I think you should be able to meet your requirements with a custom `@Provide`'r and using an arbitrary with a...