You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@RunWith(PropertyTestRunner.class)
public final class ArbFProperties {
public Property arbFProperty() {
return Property.property(
Arbitrary.arbF(Cogen.cogenInteger, Arbitrary.arbInteger),
Arbitrary.arbF(Cogen.cogenInteger, Arbitrary.arbInteger),
Arbitrary.arbInteger,
(f1, f2, arg) -> {
System.out.format("arg = %d, f1(arg) = %d, f2(arg) = %d%n", arg, f1.f(arg), f2.f(arg));
return Property.prop(true);
});
}
}
The functions always produce the same result. This seems to be intentional, the way arbF is programmed, but it is surprising to me. To create two independent functions, I have to use different cogenerators for the arguments (different arbitraries for the results are harder to make independent).
Is this a bug?
The text was updated successfully, but these errors were encountered:
mrbackend
changed the title
arbF with same arguments always produces identical functions
Two arbFs with same arguments always produce identical functions
Feb 23, 2017
Consider:
The functions always produce the same result. This seems to be intentional, the way
arbF
is programmed, but it is surprising to me. To create two independent functions, I have to use different cogenerators for the arguments (different arbitraries for the results are harder to make independent).Is this a bug?
The text was updated successfully, but these errors were encountered: