public void TestCharSequence()
{
var s1 = "Hello";
var s2 = "Heellloo";
Tuple<int, int>[] shouldbe_a = { new Tuple<int, int>(0, 0), new Tuple<int, int>(1, 2), new Tuple<int, int>(2, 4), new Tuple<int, int>(3, 5), new Tuple<int, int>(4, 7) };
Tuple<int, int>[] shouldalsobe_a = { new Tuple<int, int>(0, 0), new Tuple<int, int>(1, 2), new Tuple<int, int>(2, 4), new Tuple<int, int>(3, 5), new Tuple<int, int>(4, 6) };
var shouldbe = new System.Collections.Generic.List<Tuple<int, int>>(shouldbe_a);
var shouldalsobe = new System.Collections.Generic.List<Tuple<int, int>>(shouldalsobe_a);
var sss = LongestCommonSubsequence.LCS_Hash_Char(s1, s2);
var found = 0;
foreach (var ss in sss)
{
if (ss.SequenceEqual<Tuple<int,int>>(shouldbe) || ss.SequenceEqual<Tuple<int, int>>(shouldalsobe))
{
found +=1 ;
}
}
Assert.AreEqual<int>(2, found);
Assert.AreEqual(12, sss.Count);
}