Skip to content

Commit 774ac35

Browse files
authored
Split sorters into comparison and integer (#119)
* Split sorters into comparison and integer * Update README.md
1 parent 48bb3c7 commit 774ac35

39 files changed

+147
-122
lines changed

Algorithms.Tests/Compressors/HuffmanCompressorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Algorithms.DataCompression;
2-
using Algorithms.Sorters;
2+
using Algorithms.Sorters.Comparison;
33
using NUnit.Framework;
44
using NUnit.Framework.Internal;
55

Algorithms.Tests/Helpers/RandomHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static (int[] correctArray, int[] testArray) GetArrays(int n)
1111

1212
for (var i = 0; i < n; i++)
1313
{
14-
var t = TestContext.CurrentContext.Random.Next(0, 1000);
14+
var t = TestContext.CurrentContext.Random.Next(1_000_000);
1515
testArr[i] = t;
1616
correctArray[i] = t;
1717
}

Algorithms.Tests/Sorters/BinaryInsertionSorterTests.cs renamed to Algorithms.Tests/Sorters/Comparison/BinaryInsertionSorterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
2-
using Algorithms.Sorters;
2+
using Algorithms.Sorters.Comparison;
33
using Algorithms.Tests.Helpers;
44
using NUnit.Framework;
55

6-
namespace Algorithms.Tests.Sorters
6+
namespace Algorithms.Tests.Sorters.Comparison
77
{
88
public static class BinaryInsertionSorterTests
99
{

Algorithms.Tests/Sorters/BogoSorterTests.cs renamed to Algorithms.Tests/Sorters/Comparison/BogoSorterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
2-
using Algorithms.Sorters;
2+
using Algorithms.Sorters.Comparison;
33
using Algorithms.Tests.Helpers;
44
using NUnit.Framework;
55

6-
namespace Algorithms.Tests.Sorters
6+
namespace Algorithms.Tests.Sorters.Comparison
77
{
88
public static class BogoSorterTests
99
{

Algorithms.Tests/Sorters/BubbleSorterTests.cs renamed to Algorithms.Tests/Sorters/Comparison/BubbleSorterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using System;
22

3-
using Algorithms.Sorters;
3+
using Algorithms.Sorters.Comparison;
44
using Algorithms.Tests.Helpers;
55

66
using NUnit.Framework;
77

8-
namespace Algorithms.Tests.Sorters
8+
namespace Algorithms.Tests.Sorters.Comparison
99
{
1010
public static class BubbleSorterTests
1111
{

Algorithms.Tests/Sorters/CocktailSorterTests.cs renamed to Algorithms.Tests/Sorters/Comparison/CocktailSorterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using System;
22

3-
using Algorithms.Sorters;
3+
using Algorithms.Sorters.Comparison;
44
using Algorithms.Tests.Helpers;
55

66
using NUnit.Framework;
77

8-
namespace Algorithms.Tests.Sorters
8+
namespace Algorithms.Tests.Sorters.Comparison
99
{
1010
public static class CocktailSorterTests
1111
{

Algorithms.Tests/Sorters/CycleSorterTests.cs renamed to Algorithms.Tests/Sorters/Comparison/CycleSorterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
2-
using Algorithms.Sorters;
2+
using Algorithms.Sorters.Comparison;
33
using Algorithms.Tests.Helpers;
44
using NUnit.Framework;
55

6-
namespace Algorithms.Tests.Sorters
6+
namespace Algorithms.Tests.Sorters.Comparison
77
{
88
public static class CycleSorterTests
99
{

Algorithms.Tests/Sorters/HeapSorterTests.cs renamed to Algorithms.Tests/Sorters/Comparison/HeapSorterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
2-
using Algorithms.Sorters;
2+
using Algorithms.Sorters.Comparison;
33
using Algorithms.Tests.Helpers;
44
using NUnit.Framework;
55

6-
namespace Algorithms.Tests.Sorters
6+
namespace Algorithms.Tests.Sorters.Comparison
77
{
88
public static class HeapSorterTests
99
{

Algorithms.Tests/Sorters/InsertionSorterTests.cs renamed to Algorithms.Tests/Sorters/Comparison/InsertionSorterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
2-
using Algorithms.Sorters;
2+
using Algorithms.Sorters.Comparison;
33
using Algorithms.Tests.Helpers;
44
using NUnit.Framework;
55

6-
namespace Algorithms.Tests.Sorters
6+
namespace Algorithms.Tests.Sorters.Comparison
77
{
88
public static class InsertionSorterTests
99
{

Algorithms.Tests/Sorters/MergeSorterTests.cs renamed to Algorithms.Tests/Sorters/Comparison/MergeSorterTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
2-
using Algorithms.Sorters;
2+
using Algorithms.Sorters.Comparison;
33
using Algorithms.Tests.Helpers;
44
using NUnit.Framework;
55

6-
namespace Algorithms.Tests.Sorters
6+
namespace Algorithms.Tests.Sorters.Comparison
77
{
88
/// <summary>
99
/// Class for testing merge sorter algorithm.

0 commit comments

Comments
 (0)