-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package examples.bugs; | ||
|
||
import net.jqwik.api.*; | ||
|
||
// See https://github.com/jqwik-team/jqwik/issues/519 | ||
class Issue519Bug implements C<MyRecord> { | ||
@Provide("anyT") | ||
@Override | ||
public Arbitrary<MyRecord> anyT() { | ||
return Arbitraries.of(new MyRecord()); | ||
} | ||
} | ||
|
||
interface A<T> { | ||
@Property | ||
default boolean test1(@ForAll("anyT") T t) { | ||
return true; | ||
} | ||
|
||
Arbitrary<T> anyT(); | ||
} | ||
|
||
interface B<T extends Comparable<? super T>> extends A<T> { | ||
@Property | ||
default boolean test2(@ForAll("anyT") T t) { | ||
return true; | ||
} | ||
} | ||
|
||
interface MyType extends Comparable<MyType> { } | ||
|
||
interface C<T extends MyType> extends B<T> { | ||
@Property | ||
default boolean test3(@ForAll("anyT") T t) { | ||
return true; | ||
} | ||
} | ||
|
||
class MyRecord implements MyType { | ||
@Override | ||
public int compareTo(MyType o) { | ||
return 0; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters