Skip to content

Commit d431208

Browse files
committed
Remove the array type; it is redundant.
1 parent b3e3b0d commit d431208

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Algorithms.Tests/MachineLearning/DecisionTreeTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@ public void BuildTree_ReturnsNodeWithSingleLabel_WhenAllLabelsZero()
118118
public void Entropy_ReturnsZero_WhenAllZeroOrAllOne()
119119
{
120120
var method = typeof(DecisionTree).GetMethod("Entropy", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
121-
Assert.That(method!.Invoke(null, new object[] { new int[] { 0, 0, 0 } }), Is.EqualTo(0d));
122-
Assert.That(method!.Invoke(null, new object[] { new int[] { 1, 1, 1 } }), Is.EqualTo(0d));
121+
Assert.That(method!.Invoke(null, new [] { new int[] { 0, 0, 0 } }), Is.EqualTo(0d));
122+
Assert.That(method!.Invoke(null, new [] { new int[] { 1, 1, 1 } }), Is.EqualTo(0d));
123123
}
124124

125125
[Test]
126126
public void MostCommon_ReturnsCorrectLabel()
127127
{
128128
var method = typeof(DecisionTree).GetMethod("MostCommon", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
129-
Assert.That(method!.Invoke(null, new object[] { new int[] { 1, 0, 1, 1, 0, 0, 0 } }), Is.EqualTo(0));
130-
Assert.That(method!.Invoke(null, new object[] { new int[] { 1, 1, 1, 0 } }), Is.EqualTo(1));
129+
Assert.That(method!.Invoke(null, new [] { new int[] { 1, 0, 1, 1, 0, 0, 0 } }), Is.EqualTo(0));
130+
Assert.That(method!.Invoke(null, new [] { new int[] { 1, 1, 1, 0 } }), Is.EqualTo(1));
131131
}
132132

133133
[Test]
@@ -140,7 +140,7 @@ public void Traverse_FallbacksToZero_WhenChildrenIsNull()
140140
nodeType!.GetProperty("Label")!.SetValue(node, null);
141141
nodeType!.GetProperty("Children")!.SetValue(node, null);
142142
var method = typeof(DecisionTree).GetMethod("Traverse", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
143-
Assert.That(method!.Invoke(null, new object[] { node!, new int[] { 99 } }), Is.EqualTo(0));
143+
Assert.That(method!.Invoke(null, new[] { node!, new int[] { 99 } }), Is.EqualTo(0));
144144
}
145145

146146
[Test]

0 commit comments

Comments
 (0)