1
- import BubbleSort from '../MergeSort' ;
1
+ import MergeSort from '../MergeSort' ;
2
2
import {
3
3
equalArr ,
4
4
notSortedArr ,
@@ -15,44 +15,44 @@ const EQUAL_ARRAY_VISITING_COUNT = 79;
15
15
16
16
describe ( 'MergeSort' , ( ) => {
17
17
it ( 'should sort array' , ( ) => {
18
- SortTester . testSort ( BubbleSort ) ;
18
+ SortTester . testSort ( MergeSort ) ;
19
19
} ) ;
20
20
21
21
it ( 'should sort array with custom comparator' , ( ) => {
22
- SortTester . testSortWithCustomComparator ( BubbleSort ) ;
22
+ SortTester . testSortWithCustomComparator ( MergeSort ) ;
23
23
} ) ;
24
24
25
25
it ( 'should do stable sorting' , ( ) => {
26
- SortTester . testSortStability ( BubbleSort ) ;
26
+ SortTester . testSortStability ( MergeSort ) ;
27
27
} ) ;
28
28
29
29
it ( 'should visit EQUAL array element specified number of times' , ( ) => {
30
30
SortTester . testAlgorithmTimeComplexity (
31
- BubbleSort ,
31
+ MergeSort ,
32
32
equalArr ,
33
33
EQUAL_ARRAY_VISITING_COUNT ,
34
34
) ;
35
35
} ) ;
36
36
37
37
it ( 'should visit SORTED array element specified number of times' , ( ) => {
38
38
SortTester . testAlgorithmTimeComplexity (
39
- BubbleSort ,
39
+ MergeSort ,
40
40
sortedArr ,
41
41
SORTED_ARRAY_VISITING_COUNT ,
42
42
) ;
43
43
} ) ;
44
44
45
45
it ( 'should visit NOT SORTED array element specified number of times' , ( ) => {
46
46
SortTester . testAlgorithmTimeComplexity (
47
- BubbleSort ,
47
+ MergeSort ,
48
48
notSortedArr ,
49
49
NOT_SORTED_ARRAY_VISITING_COUNT ,
50
50
) ;
51
51
} ) ;
52
52
53
53
it ( 'should visit REVERSE SORTED array element specified number of times' , ( ) => {
54
54
SortTester . testAlgorithmTimeComplexity (
55
- BubbleSort ,
55
+ MergeSort ,
56
56
reverseArr ,
57
57
REVERSE_SORTED_ARRAY_VISITING_COUNT ,
58
58
) ;
0 commit comments