|
@@ -1,16 +1,16 @@
|
1
|
1
|
package Swap;
|
2
|
|
-//
|
3
|
|
-//import org.junit.Assert;
|
4
|
|
-//import org.junit.Test;
|
5
|
|
-//
|
6
|
|
-///**
|
7
|
|
-// * Get the tests passing.
|
8
|
|
-// */
|
9
|
|
-//public class SwapTest {
|
10
|
|
-// @Test
|
11
|
|
-// public void testSwap() throws Exception {
|
12
|
|
-// Double[] result = Swap.swap(0,1, 1.5, 2,3);
|
13
|
|
-// Double[] expected = {2.0, 1.5, 3.0};
|
14
|
|
-// Assert.assertArrayEquals(expected, result);
|
15
|
|
-// }
|
16
|
|
-//}
|
|
2
|
+
|
|
3
|
+import org.junit.Assert;
|
|
4
|
+import org.junit.Test;
|
|
5
|
+
|
|
6
|
+/**
|
|
7
|
+ * Get the tests passing.
|
|
8
|
+ */
|
|
9
|
+public class SwapTest {
|
|
10
|
+ @Test
|
|
11
|
+ public void testSwap() throws Exception {
|
|
12
|
+ Double[] result = Swap.swap(0,1, 1.5, 2.0 ,3.0); //was missing decimals
|
|
13
|
+ Double[] expected = {2.0, 1.5, 3.0};
|
|
14
|
+ Assert.assertArrayEquals(expected, result);
|
|
15
|
+ }
|
|
16
|
+}
|