Skip to content

Commit 503bb01

Browse files
committed
Merge commit, git oull origin master.
1 parent 22b7c2f commit 503bb01

File tree

5 files changed

+23
-17
lines changed

5 files changed

+23
-17
lines changed

Algorithms/Algorithms.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</PropertyGroup>
55

66
<ItemGroup>
7-
<PackageReference Include="xunit" Version="2.4.0" />
7+
<PackageReference Include="xunit" Version="2.4.1" />
88
</ItemGroup>
99

1010
<ItemGroup>

Algorithms/Graphs/BellmanFordShortestPaths.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,23 @@ public class BellmanFordShortestPaths<TGraph, TVertex>
3535
/// </summary>
3636
public BellmanFordShortestPaths(TGraph Graph, TVertex Source)
3737
{
38-
if (Graph == null)
39-
throw new ArgumentNullException();
40-
if (!Graph.HasVertex(Source))
41-
throw new ArgumentException("The source vertex doesn't belong to graph.");
38+
if (Graph == null) {
39+
throw new ArgumentNullException ();
40+
} else {
41+
if (!Graph.HasVertex (Source))
42+
throw new ArgumentException ("The source vertex doesn't belong to graph.");
4243

43-
// Init
44-
_initializeDataMembers(Graph);
44+
// Init
45+
_initializeDataMembers (Graph);
4546

46-
// Traverse the graph
47-
var status = _bellmanFord(Graph, Source);
47+
// Traverse the graph
48+
var status = _bellmanFord (Graph, Source);
4849

49-
if (status == false)
50-
throw new Exception("Negative-weight cycle detected.");
50+
if (status == false)
51+
throw new Exception ("Negative-weight cycle detected.");
5152

52-
Debug.Assert(_checkOptimalityConditions(Graph, Source));
53+
Debug.Assert (_checkOptimalityConditions (Graph, Source));
54+
}
5355
}
5456

5557

DataStructures/DataStructures.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</PropertyGroup>
55

66
<ItemGroup>
7-
<PackageReference Include="xunit" Version="2.4.0" />
7+
<PackageReference Include="xunit" Version="2.4.1" />
88
</ItemGroup>
99

1010
<ItemGroup>

UnitTest/DataStructuresTests/HashTableSeparateChainingTest.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ public static void DoTest()
101101
Assert.True(studentsMarks.Count == 3);
102102

103103
KeyValuePair<string, int>[] array = new KeyValuePair<string, int>[studentsMarks.Count];
104-
studentsMarks.CopyTo(array, 0);
104+
105+
if (studentsMarks != null)
106+
{
107+
studentsMarks.CopyTo(array, 0);
108+
}
105109

106110
Assert.True(array.Length == studentsMarks.Count);
107111
}

UnitTest/UnitTest.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
<ItemGroup>
77
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
8-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
9-
<PackageReference Include="xunit" Version="2.4.0" />
10-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
8+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
9+
<PackageReference Include="xunit" Version="2.4.1" />
10+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

0 commit comments

Comments
 (0)