Skip to content

Commit

Permalink
Updates from reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 authored and ddaspit committed Apr 16, 2024
1 parent 73c92b1 commit a19b9d2
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions tests/SIL.Machine.Tests/Corpora/ScriptureRefTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public int CompareTo_Strict(string ref1Str, string ref2Str)

int result = ref1.CompareTo(ref2);

// this tests the IComparable<ScriptureRef>.CompareTo method responds the same as the ScriptureRef.CompareTo method.
int result2 = ((IComparable<ScriptureRef>)ref1).CompareTo(ref2);
Assert.That(result, Is.EqualTo(result2));

if (result < 0)
result = -1;
else if (result > 0)
Expand Down Expand Up @@ -51,22 +55,6 @@ public int CompareTo_Relaxed(string ref1Str, string ref2Str)
return result;
}

[TestCase]
public void CompareTemplate()
{
// this tests the IComparable<ScriptureRef>.CompareTo method by calling Sort() on a list of ScriptureRefs
var refs = new List<ScriptureRef> { ScriptureRef.Parse("MAT 1:2"), ScriptureRef.Parse("MAT 1:1") };
refs.Sort();
Assert.That(refs[0].ToString(), Is.EqualTo("MAT 1:1"));
var dictRefs = new HashSet<ScriptureRef>
{
ScriptureRef.Parse("MAT 1:1/1:p"),
ScriptureRef.Parse("MAT 1:2/1:p"),
ScriptureRef.Parse("MAT 1:2/1:p")
};
Assert.That(dictRefs.Count, Is.EqualTo(2));
}

[TestCase]
public void IsEqualTo()
{
Expand Down

0 comments on commit a19b9d2

Please sign in to comment.