Skip to content

Commit e508c8e

Browse files
author
Gonzalo Diaz
committed
WIP
1 parent b6b19f4 commit e508c8e

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/algorithm_exercises_csharp_test/Hello.Test.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void testInstance()
3434
public void testHello()
3535
{
3636
string expected = "Hello World!";
37-
string result = HelloWorld.create().hello();
37+
string result = new HelloWorld().hello();
3838

3939
Assert.AreEqual(expected, result);
4040
}

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/arrays/ArraysLeftRotation.Test.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ public class ArraysLeftRotationTest
77
{
88
public class ArraysLeftRotationsTestCase(int[] input, int d, int[] expected)
99
{
10-
private readonly List<int> input = input.ToList();
10+
private readonly List<int> input = [.. input];
1111
private readonly int d = d;
12-
private readonly List<int> expected = expected.ToList();
12+
private readonly List<int> expected = [.. expected];
1313

1414
public List<int> Input
1515
{

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/greedy_algorithms/LuckBalance.Test.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public void testLuckBalance()
3434
Assert.AreEqual(
3535
test.expected,
3636
result,
37-
String.Format(
37+
string.Format(
38+
System.Globalization.CultureInfo.InvariantCulture,
3839
"testLuckBalance({0}, {1}) => must be: {2}",
3940
test.k,
4041
test.contests.ToString(),

src/algorithm_exercises_csharp_test/hackerrank/interview_preparation_kit/linked_list/lib/Node.Test.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ public void testPrintLinkedList()
4545
{
4646
foreach (NodeTestCase test in tests)
4747
{
48-
StringWriter sw = new();
49-
48+
using StringWriter sw = new();
5049
LinkedList<int>.printSinglyLinkedList(test.llist, test.separator, sw);
5150

5251
string result = sw.ToString();
5352
Assert.AreEqual(
5453
test.expected,
5554
result,
56-
String.Format(
55+
string.Format(
56+
System.Globalization.CultureInfo.InvariantCulture,
5757
"{0} testPrintLinkedList<int>(<Node>, {1}, <Textwriter>) => must be: {2}",
5858
test.title,
5959
test.separator,

0 commit comments

Comments
 (0)