提交 499fce86 编写于 作者: yin-zh's avatar yin-zh

更新src/test/java/com/yzh/InsertionSortTest.java

上级 a3bb3362
package com.yzh;
import org.junit.Assert;
import org.junit.Test;
/**
* @author yinzhihong
* @description: TODO
* @date 2021/7/7 2:42 下午
*/
public class InsertionSortTest {
InsertionSort insertionSort = new InsertionSort();
@Test
/**
* 对提交的选择排序代码进行单元测试
*/
public void fun(){
int expected1[] = {1,2,3,4,5,6};
int actuals1[] = insertionSort.solution(new int[]{4,2,1,5,6,3});
int expected2[] = {1,2,3,5,6,7,9};
int actuals2[] = insertionSort.solution(new int[]{5,7,3,1,6,9,2});
Assert.assertArrayEquals(expected1,actuals1);
Assert.assertArrayEquals(expected2,actuals2);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册