Skip to content

Commit 5100deb

Browse files
committed
Update canonical data to latest version
1 parent 75197cb commit 5100deb

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

exercises/anagram/AnagramTest.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was auto-generated based on version 1.4.1 of the canonical data.
1+
// This file was auto-generated based on version 1.5.0 of the canonical data.
22

33
using Xunit;
44

@@ -47,6 +47,15 @@ public void Detects_three_anagrams()
4747
Assert.Equal(expected, sut.FindAnagrams(candidates));
4848
}
4949

50+
[Fact(Skip = "Remove to run test")]
51+
public void Detects_multiple_anagrams_with_different_case()
52+
{
53+
var candidates = new[] { "Eons", "ONES" };
54+
var sut = new Anagram("nose");
55+
var expected = new[] { "Eons", "ONES" };
56+
Assert.Equal(expected, sut.FindAnagrams(candidates));
57+
}
58+
5059
[Fact(Skip = "Remove to run test")]
5160
public void Does_not_detect_non_anagrams_with_identical_checksum()
5261
{
@@ -105,4 +114,13 @@ public void Words_are_not_anagrams_of_themselves_case_insensitive_()
105114
var sut = new Anagram("BANANA");
106115
Assert.Empty(sut.FindAnagrams(candidates));
107116
}
117+
118+
[Fact(Skip = "Remove to run test")]
119+
public void Words_other_than_themselves_can_be_anagrams()
120+
{
121+
var candidates = new[] { "Listen", "Silent", "LISTEN" };
122+
var sut = new Anagram("LISTEN");
123+
var expected = new[] { "Silent" };
124+
Assert.Equal(expected, sut.FindAnagrams(candidates));
125+
}
108126
}

exercises/circular-buffer/CircularBufferTest.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was auto-generated based on version 1.1.0 of the canonical data.
1+
// This file was auto-generated based on version 1.2.0 of the canonical data.
22

33
using System;
44
using Xunit;
@@ -132,4 +132,18 @@ public void Overwrite_replaces_the_oldest_item_remaining_in_buffer_following_a_r
132132
Assert.Equal(4, buffer.Read());
133133
Assert.Equal(5, buffer.Read());
134134
}
135+
136+
[Fact(Skip = "Remove to run test")]
137+
public void Initial_clear_does_not_affect_wrapping_around()
138+
{
139+
var buffer = new CircularBuffer<int>(capacity: 2);
140+
buffer.Clear();
141+
buffer.Write(1);
142+
buffer.Write(2);
143+
buffer.Overwrite(3);
144+
buffer.Overwrite(4);
145+
Assert.Equal(3, buffer.Read());
146+
Assert.Equal(4, buffer.Read());
147+
Assert.Throws<InvalidOperationException>(() => buffer.Read());
148+
}
135149
}

0 commit comments

Comments
 (0)