We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fedea6b commit 24766baCopy full SHA for 24766ba
2 files changed
core/src/main/java/fj/data/Array.java
@@ -12,6 +12,7 @@
12
import fj.function.Effect1;
13
14
import java.util.AbstractCollection;
15
+import java.util.ArrayList;
16
import java.util.Collection;
17
import java.util.Iterator;
18
import java.util.NoSuchElementException;
core/src/test/java/fj/data/ArrayTest.java
@@ -1,13 +1,20 @@
1
package fj.data;
2
3
+import org.junit.Test;
4
+
5
+import static org.hamcrest.CoreMatchers.equalTo;
6
+import static org.junit.Assert.assertThat;
7
8
/**
9
* Created by MarkPerry on 14 Feb 16.
10
*/
11
public class ArrayTest {
-
- public void test1() {
+ @Test
+ public void toJavaArray() {
+ final int max = 3;
+ List<Integer> list = List.range(1, max + 1);
+ assertThat(list.toArray().toJavaArray(), equalTo(list.toJavaArray()));
}
19
20
0 commit comments