summaryrefslogtreecommitdiff
path: root/src/test/java/au
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-01 10:38:08 +1000
committerCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-01 10:38:08 +1000
commitedfce37bc21699042baf14ad6d172d3187fe530c (patch)
tree7e3379e7a0f2a1c5ba203bea72f468941ca13dad /src/test/java/au
parent7e1182355d54f0dc8461ce7df7c4aca8c40d2a92 (diff)
Add @DataSource, allow printing of RoseTrees, other small changes to generators
Diffstat (limited to 'src/test/java/au')
-rw-r--r--src/test/java/au/id/zancanaro/SimpleListOperationsTest.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/java/au/id/zancanaro/SimpleListOperationsTest.java b/src/test/java/au/id/zancanaro/SimpleListOperationsTest.java
index 2ff44e7..20f419a 100644
--- a/src/test/java/au/id/zancanaro/SimpleListOperationsTest.java
+++ b/src/test/java/au/id/zancanaro/SimpleListOperationsTest.java
@@ -1,5 +1,6 @@
package au.id.zancanaro;
+import au.id.zancanaro.annotations.DataSource;
import au.id.zancanaro.annotations.Property;
import org.junit.runner.RunWith;
@@ -14,13 +15,10 @@ import static org.junit.Assert.assertEquals;
@RunWith(Properties.class)
public class SimpleListOperationsTest {
- @SuppressWarnings("unused")
- public static Generator<Integer> integers = integer();
-
- @SuppressWarnings("unused")
+ @DataSource
public static Generator<List<Integer>> listOfIntegers = listOf(integer());
- @Property(maxSize = 10000, runs = 10000)
+ @Property
public void sortingIsIdempotent(List<Integer> list) {
List<Integer> left = new ArrayList<>(list);
Collections.sort(left);