Fix bug in character set intersection calculation

This commit is contained in:
Max Brunsfeld 2014-03-24 19:17:25 -07:00
parent 9cb92a0a96
commit 2a5dd3434f
2 changed files with 8 additions and 0 deletions

View file

@ -108,6 +108,12 @@ describe("character sets", []() {
CharacterSet set2({ {'c', 'y'} });
AssertThat(set1.intersect(set2), Equals(CharacterSet({ {'c', 'e'}, {'w', 'y'} })));
});
it("works for some sets", []() {
CharacterSet set1({ {'i', 'i'} });
CharacterSet set2({ {'a', 'z'} });
AssertThat(set1.intersect(set2), Equals(CharacterSet({ {'i', 'i'} })));
});
});
});