+/EE422C
software design
git clone https://git.julia.blue/+/EE422C
ead272f
master
1import static org .junit .Assert .*; 2 3import org .junit .Test ; 4 5public class SelectionSortTest { 6 7@ Test 8public void test () { 9int []arr =new int [] {6 ,1 ,2 ,8 ,9 ,3 ,0 ,5 ,4 ,7 }; 10int []expected = {0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 }; 11SelectionSort .sort (arr ); 12for (int i =0 ;i <arr .length ;i ++) { 13System .out .arr [i ]); 14 } 15assertArrayEquals (arr ,expected ); 16 } 17 18@ Test 19public void test_swap () { 20int []arr =new int [] {1 ,0 }; 21int []expected = {0 ,1 }; 22SelectionSort .swap (arr ,0 ,1 ); 23assertArrayEquals (arr ,expected ); 24 } 25}