Skip to content

Commit

Permalink
Update canonical data to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
robkeim committed Jul 23, 2019
1 parent 75197cb commit 5100deb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
20 changes: 19 additions & 1 deletion exercises/anagram/AnagramTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was auto-generated based on version 1.4.1 of the canonical data.
// This file was auto-generated based on version 1.5.0 of the canonical data.

using Xunit;

Expand Down Expand Up @@ -47,6 +47,15 @@ public void Detects_three_anagrams()
Assert.Equal(expected, sut.FindAnagrams(candidates));
}

[Fact(Skip = "Remove to run test")]
public void Detects_multiple_anagrams_with_different_case()
{
var candidates = new[] { "Eons", "ONES" };
var sut = new Anagram("nose");
var expected = new[] { "Eons", "ONES" };
Assert.Equal(expected, sut.FindAnagrams(candidates));
}

[Fact(Skip = "Remove to run test")]
public void Does_not_detect_non_anagrams_with_identical_checksum()
{
Expand Down Expand Up @@ -105,4 +114,13 @@ public void Words_are_not_anagrams_of_themselves_case_insensitive_()
var sut = new Anagram("BANANA");
Assert.Empty(sut.FindAnagrams(candidates));
}

[Fact(Skip = "Remove to run test")]
public void Words_other_than_themselves_can_be_anagrams()
{
var candidates = new[] { "Listen", "Silent", "LISTEN" };
var sut = new Anagram("LISTEN");
var expected = new[] { "Silent" };
Assert.Equal(expected, sut.FindAnagrams(candidates));
}
}
16 changes: 15 additions & 1 deletion exercises/circular-buffer/CircularBufferTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was auto-generated based on version 1.1.0 of the canonical data.
// This file was auto-generated based on version 1.2.0 of the canonical data.

using System;
using Xunit;
Expand Down Expand Up @@ -132,4 +132,18 @@ public void Overwrite_replaces_the_oldest_item_remaining_in_buffer_following_a_r
Assert.Equal(4, buffer.Read());
Assert.Equal(5, buffer.Read());
}

[Fact(Skip = "Remove to run test")]
public void Initial_clear_does_not_affect_wrapping_around()
{
var buffer = new CircularBuffer<int>(capacity: 2);
buffer.Clear();
buffer.Write(1);
buffer.Write(2);
buffer.Overwrite(3);
buffer.Overwrite(4);
Assert.Equal(3, buffer.Read());
Assert.Equal(4, buffer.Read());
Assert.Throws<InvalidOperationException>(() => buffer.Read());
}
}

0 comments on commit 5100deb

Please sign in to comment.