Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
45 | 2 | 4 | 0.973 | class_member_declarations[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 45 | 71 | src/Iesi.Collections.Test/Generic/SetFixture.cs |
2 | 45 | 64 | src/Iesi.Collections.Test/SetFixture.cs |
| ||||
#endregion #region System.Collections.ICollection Member Tests [Test] public void CopyTo() { string[] dest = new string[3]; _set.CopyTo(dest, 0); int count = 0; foreach (string obj in dest) { Assert.IsTrue(_set.Contains(obj), "set should contain the object in the array"); count++; } Assert.AreEqual(3, count, "should have 3 items in array"); } [Test] public void Count() { Assert.AreEqual(3, _set.Count, "should be 3 items"); Assert.AreEqual(0, CreateInstance().Count, "new set should have nothing in it."); } #endregion #region Iesi.Collections.ISet<string> Constructor Tests [Test] public void CtorWithDefaults() { List<string> init = new List<string> (3); init.Add("one"); init.Add("two"); init.Add("three"); ISet<string> theSet = CreateInstance(init); Assert.AreEqual(3, init.Count, "3 items in set"); int index = 0; foreach (string obj in init) { Assert.IsTrue(theSet.Contains(obj), "set should contain obj at index = " + index.ToString()); index++; } } |
| ||||
#endregion #region System.Collections.ICollection Member Tests [Test] public void CopyTo() { object[] dest = new object[3]; _set.CopyTo(dest, 0); int count = 0; foreach (object obj in dest) { Assert.IsTrue(_set.Contains(obj), "set should contain the object in the array"); count++; } Assert.AreEqual(3, count, "should have 3 items in array"); } [Test] public void Count() { Assert.AreEqual(3, _set.Count, "should be 3 items"); Assert.AreEqual(0, CreateInstance().Count, "new set should have nothing in it."); } #endregion #region Iesi.Collections.ISet Constructor Tests [Test] public void CtorWithDefaults() { ArrayList init = new ArrayList(3); init.Add("one"); init.Add("two"); init.Add("three"); ISet theSet = CreateInstance(init); Assert.AreEqual(3, init.Count, "3 items in set"); int index = 0; foreach (object obj in init) { Assert.IsTrue(theSet.Contains(obj), "set should contain obj at index = " + index.ToString()); index++; } } |
| |||
#endregion #region System.Collections.ICollection Member Tests [Test] public void CopyTo() { [[#variable687f8f40]][] dest = new [[#variable687f8f40]][3]; _set.CopyTo(dest, 0); int count = 0; foreach ( [[#variable687f8f40]]obj in dest) { Assert.IsTrue(_set.Contains(obj), "set should contain the object in the array"); count++; } Assert.AreEqual(3, count, "should have 3 items in array"); } [Test] public void Count() { Assert.AreEqual(3, _set.Count, "should be 3 items"); Assert.AreEqual(0, CreateInstance().Count, "new set should have nothing in it."); } #endregion #region Iesi.Collections.ISet<string> Constructor Tests #region Iesi.Collections.ISet Constructor Tests [Test] public void CtorWithDefaults() { [[#variable52088f40]]init = new [[#variable70b27540]](3); init.Add("one"); init.Add("two"); init.Add("three"); [[#variable7037ef20]]theSet = CreateInstance(init); Assert.AreEqual(3, init.Count, "3 items in set"); int index = 0; foreach ( [[#variable687f8f40]]obj in init) { Assert.IsTrue(theSet.Contains(obj), "set should contain obj at index = " + index.ToString()); index++; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#687f8f40]] | string |
1 | 2 | [[#687f8f40]] | object |
2 | 1 | [[#52088f40]] | List<string> |
2 | 2 | [[#52088f40]] | ArrayList |
3 | 1 | [[#70b27540]] | List<string> |
3 | 2 | [[#70b27540]] | ArrayList |
4 | 1 | [[#7037ef20]] | ISet<string> |
4 | 2 | [[#7037ef20]] | ISet |