mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 22:43:30 +08:00
Fix naming LinkList_sort
-> LinkListSort
(#3640)
This commit is contained in:
@ -2,7 +2,7 @@ package com.thealgorithms.others;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import com.thealgorithms.sorts.LinkList_Sort;
|
||||
import com.thealgorithms.sorts.LinkListSort;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class LinkListSortTest {
|
||||
@ -10,48 +10,48 @@ public class LinkListSortTest {
|
||||
@Test
|
||||
void testForOneElement() {
|
||||
int a[] = { 56 };
|
||||
assertTrue(LinkList_Sort.isSorted(a, 2));
|
||||
assertTrue(LinkListSort.isSorted(a, 2));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForTwoElements() {
|
||||
int a[] = { 6, 4 };
|
||||
assertTrue(LinkList_Sort.isSorted(a, 1));
|
||||
assertTrue(LinkListSort.isSorted(a, 1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForThreeElements() {
|
||||
int a[] = { 875, 253, 12 };
|
||||
assertTrue(LinkList_Sort.isSorted(a, 3));
|
||||
assertTrue(LinkListSort.isSorted(a, 3));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForFourElements() {
|
||||
int a[] = { 86, 32, 87, 13 };
|
||||
assertTrue(LinkList_Sort.isSorted(a, 1));
|
||||
assertTrue(LinkListSort.isSorted(a, 1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForFiveElements() {
|
||||
int a[] = { 6, 5, 3, 0, 9 };
|
||||
assertTrue(LinkList_Sort.isSorted(a, 1));
|
||||
assertTrue(LinkListSort.isSorted(a, 1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForSixElements() {
|
||||
int a[] = { 9, 65, 432, 32, 47, 327 };
|
||||
assertTrue(LinkList_Sort.isSorted(a, 3));
|
||||
assertTrue(LinkListSort.isSorted(a, 3));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForSevenElements() {
|
||||
int a[] = { 6, 4, 2, 1, 3, 6, 7 };
|
||||
assertTrue(LinkList_Sort.isSorted(a, 1));
|
||||
assertTrue(LinkListSort.isSorted(a, 1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForEightElements() {
|
||||
int a[] = { 123, 234, 145, 764, 322, 367, 768, 34 };
|
||||
assertTrue(LinkList_Sort.isSorted(a, 2));
|
||||
assertTrue(LinkListSort.isSorted(a, 2));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user