DataSharp/Mathematics/FunctionalityTest.cs
/// <summary>
/// Test the SetEquals() method defied in the ISet&lt;T> interface. 
/// </summary>
Test the SetEquals() method defied in the ISet interface.
Test the SetEquals () method defied in the ISet interface .
public static void SetEqualityTest()
        {
            int[] values = { 1, 2, 3, 4 };
            SortedSet<int> set1 = new SortedSet<int>(values);
            SortedSet<int> set2 = new SortedSet<int>(values);
            HashSet<int> set3 = new HashSet<int>(values);
            Console.WriteLine("Test for 2 SortedSet<int>:");
            Console.Write("set1 : ");
            PrintIEnumerable(set1);
            Console.Write("set2 : ");
            PrintIEnumerable(set2);
            Console.WriteLine("SetEquality(set1, set2) : {0}", set1.SetEquals(set2));
            Console.WriteLine("Test for a SortedSet<int> and a HashSet<int>:");
            Console.Write("set1 : ");
            PrintIEnumerable(set1);
            Console.Write("set3 : ");
            PrintIEnumerable(set3);
            Console.WriteLine("SetEquality(set1, set3) : {0}", set1.SetEquals(set3));
        }
public static void SetEqualityTest ( ) { int [ ] values = { 1 , 2 , 3 , 4 } ; SortedSet < int > set1 = new SortedSet < int > ( values ) ; SortedSet < int > set2 = new SortedSet < int > ( values ) ; HashSet < int > set3 = new HashSet < int > ( values ) ; Console . WriteLine ( " " ) ; Console . Write ( " " ) ; PrintIEnumerable ( set1 ) ; Console . Write ( " " ) ; PrintIEnumerable ( set2 ) ; Console . WriteLine ( " " , set1 . SetEquals ( set2 ) ) ; Console . WriteLine ( " " ) ; Console . Write ( " " ) ; PrintIEnumerable ( set1 ) ; Console . Write ( " " ) ; PrintIEnumerable ( set3 ) ; Console . WriteLine ( " " , set1 . SetEquals ( set3 ) ) ; }
Test the SetEquals() method defied in the ISet<T> interface.
Test the SetEquals () method defied in the ISet<T > interface .
// Generate test data. // Test for 2 SortedSet<int>. // Test for a SortedSet<int> and a HashSet<int>.