Commit 739e6112 authored by Younis's avatar Younis
Browse files

Add new file SchachtelArraysTest

parent 4e328892
import org.junit.Test;
import static org.junit.Assert.*;
public class SchachtelArraysTest {
@Test
public void testMymatrixA() {
int[][] expected = {{10, 11, 12}, {20, 21, 22}, {30, 31, 33}};
assertArrayEquals(expected, SchachtelArrays.mymatrixA);
}
@Test
public void testMymatrixB() {
int[][] expected = {{10, 11, 12}, {20, 21, 22}, {30, 31, 32}};
assertArrayEquals(expected, SchachtelArrays.mymatrixB);
}
@Test
public void testMymatrixC() {
int[][] expected = {{10, 11, 12}, {20, 21, 22}, {30, 31, 32}};
assertArrayEquals(expected, SchachtelArrays.mymatrixC);
}
@Test
public void testMymatrixD() {
int[][] expected = new int[3][3];
for (int i = 0; i < expected.length; i++) {
for (int j = 0; j < expected[i].length; j++) {
expected[i][j] = 10 * i + j;
}
}
assertArrayEquals(expected, SchachtelArrays.mymatrixD);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment