@@ -2866,67 +2866,87 @@ SetTestSuite.test("isSubsetOf.Set.Set") {
28662866 let s2 = Set ( [ 1010 , 2020 , 3030 ] )
28672867 expectTrue ( Set < Int > ( ) . isSubset ( of: s1) )
28682868 expectFalse ( s1. isSubset ( of: Set < Int > ( ) ) )
2869+ expectTrue ( Set < Int > ( ) . isSubset ( of: Set < Int > ( ) ) )
28692870 expectTrue ( s1. isSubset ( of: s1) )
2871+ expectFalse ( s1. isSubset ( of: s2) )
28702872 expectTrue ( s2. isSubset ( of: s1) )
28712873}
28722874
28732875SetTestSuite . test ( " isSubsetOf.Set.Sequence " ) {
2874- let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
2875- expectTrue ( Set < Int > ( ) . isSubset ( of: s1) )
2876- expectFalse ( s1. isSubset ( of: Set < Int > ( ) ) )
2877- expectTrue ( s1. isSubset ( of: s1) )
2876+ typealias Seq = Array < Int >
2877+ let s1 = Set ( [ 1010 , 2020 , 3030 ] )
2878+ expectTrue ( Set < Int > ( ) . isSubset ( of: [ 1010 ] as Seq ) )
2879+ expectFalse ( s1. isSubset ( of: [ ] as Seq ) )
2880+ expectTrue ( Set < Int > ( ) . isSubset ( of: [ ] as Seq ) )
2881+ expectTrue ( s1. isSubset ( of: [ 1010 , 2020 , 3030 ] as Seq ) )
2882+ expectFalse ( s1. isSubset ( of: [ 1010 , 2020 ] as Seq ) )
2883+ expectTrue ( s1. isSubset ( of: [ 1010 , 2020 , 3030 , 4040 ] as Seq ) )
28782884}
28792885
28802886SetTestSuite . test ( " isStrictSubsetOf.Set.Set " ) {
28812887 let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
2888+ let s2 = Set ( [ 1010 , 2020 , 3030 ] )
28822889 expectTrue ( Set < Int > ( ) . isStrictSubset ( of: s1) )
28832890 expectFalse ( s1. isStrictSubset ( of: Set < Int > ( ) ) )
2891+ expectFalse ( Set < Int > ( ) . isStrictSubset ( of: Set < Int > ( ) ) )
28842892 expectFalse ( s1. isStrictSubset ( of: s1) )
2893+ expectFalse ( s1. isStrictSubset ( of: s2) )
2894+ expectTrue ( s2. isStrictSubset ( of: s1) )
28852895}
28862896
28872897SetTestSuite . test ( " isStrictSubsetOf.Set.Sequence " ) {
2888- let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
2889- expectTrue ( Set < Int > ( ) . isStrictSubset ( of: s1) )
2890- expectFalse ( s1. isStrictSubset ( of: Set < Int > ( ) ) )
2891- expectFalse ( s1. isStrictSubset ( of: s1) )
2898+ typealias Seq = Array < Int >
2899+ let s1 = Set ( [ 1010 , 2020 , 3030 ] )
2900+ expectTrue ( Set < Int > ( ) . isStrictSubset ( of: [ 1010 ] as Seq ) )
2901+ expectFalse ( s1. isStrictSubset ( of: [ ] as Seq ) )
2902+ expectFalse ( Set < Int > ( ) . isStrictSubset ( of: [ ] as Seq ) )
2903+ expectFalse ( s1. isStrictSubset ( of: [ 1010 , 2020 , 3030 ] as Seq ) )
2904+ expectFalse ( s1. isStrictSubset ( of: [ 1010 , 2020 ] as Seq ) )
2905+ expectTrue ( s1. isStrictSubset ( of: [ 1010 , 2020 , 3030 , 4040 ] as Seq ) )
28922906}
28932907
28942908SetTestSuite . test ( " isSupersetOf.Set.Set " ) {
28952909 let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
28962910 let s2 = Set ( [ 1010 , 2020 , 3030 ] )
28972911 expectTrue ( s1. isSuperset ( of: Set < Int > ( ) ) )
28982912 expectFalse ( Set < Int > ( ) . isSuperset ( of: s1) )
2913+ expectTrue ( Set < Int > ( ) . isSuperset ( of: Set < Int > ( ) ) )
28992914 expectTrue ( s1. isSuperset ( of: s1) )
29002915 expectTrue ( s1. isSuperset ( of: s2) )
2901- expectFalse ( Set < Int > ( ) . isSuperset ( of: s1) )
2916+ expectFalse ( s2 . isSuperset ( of: s1) )
29022917}
29032918
29042919SetTestSuite . test ( " isSupersetOf.Set.Sequence " ) {
2905- let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
2906- let s2 = AnySequence ( [ 1010 , 2020 , 3030 ] )
2907- expectTrue ( s1. isSuperset ( of: Set < Int > ( ) ) )
2908- expectFalse ( Set < Int > ( ) . isSuperset ( of: s1) )
2909- expectTrue ( s1. isSuperset ( of: s1) )
2910- expectTrue ( s1. isSuperset ( of: s2) )
2911- expectFalse ( Set < Int > ( ) . isSuperset ( of: s1) )
2920+ typealias Seq = Array < Int >
2921+ let s1 = Set ( [ 1010 , 2020 , 3030 ] )
2922+ expectTrue ( s1. isSuperset ( of: [ ] as Seq ) )
2923+ expectFalse ( Set < Int > ( ) . isSuperset ( of: [ 1010 ] as Seq ) )
2924+ expectTrue ( Set < Int > ( ) . isSuperset ( of: [ ] as Seq ) )
2925+ expectTrue ( s1. isSuperset ( of: [ 1010 , 2020 , 3030 ] as Seq ) )
2926+ expectTrue ( s1. isSuperset ( of: [ 1010 , 2020 ] as Seq ) )
2927+ expectFalse ( s1. isSuperset ( of: [ 1010 , 2020 , 3030 , 4040 ] as Seq ) )
29122928}
29132929
2914- SetTestSuite . test ( " strictSuperset .Set.Set" ) {
2930+ SetTestSuite . test ( " isStrictSuperset .Set.Set" ) {
29152931 let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
29162932 let s2 = Set ( [ 1010 , 2020 , 3030 ] )
29172933 expectTrue ( s1. isStrictSuperset ( of: Set < Int > ( ) ) )
29182934 expectFalse ( Set < Int > ( ) . isStrictSuperset ( of: s1) )
2935+ expectFalse ( Set < Int > ( ) . isStrictSuperset ( of: Set < Int > ( ) ) )
29192936 expectFalse ( s1. isStrictSuperset ( of: s1) )
29202937 expectTrue ( s1. isStrictSuperset ( of: s2) )
2938+ expectFalse ( s2. isStrictSuperset ( of: s1) )
29212939}
29222940
2923- SetTestSuite . test ( " strictSuperset.Set.Sequence " ) {
2924- let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
2925- let s2 = AnySequence ( [ 1010 , 2020 , 3030 ] )
2926- expectTrue ( s1. isStrictSuperset ( of: Set < Int > ( ) ) )
2927- expectFalse ( Set < Int > ( ) . isStrictSuperset ( of: s1) )
2928- expectFalse ( s1. isStrictSuperset ( of: s1) )
2929- expectTrue ( s1. isStrictSuperset ( of: s2) )
2941+ SetTestSuite . test ( " isStrictSuperset.Set.Sequence " ) {
2942+ typealias Seq = Array < Int >
2943+ let s1 = Set ( [ 1010 , 2020 , 3030 ] )
2944+ expectTrue ( s1. isStrictSuperset ( of: [ ] as Seq ) )
2945+ expectFalse ( Set < Int > ( ) . isStrictSuperset ( of: [ 1010 ] as Seq ) )
2946+ expectFalse ( Set < Int > ( ) . isStrictSuperset ( of: [ ] as Seq ) )
2947+ expectFalse ( s1. isStrictSuperset ( of: [ 1010 , 2020 , 3030 ] as Seq ) )
2948+ expectTrue ( s1. isStrictSuperset ( of: [ 1010 , 2020 ] as Seq ) )
2949+ expectFalse ( s1. isStrictSuperset ( of: [ 1010 , 2020 , 3030 , 4040 ] as Seq ) )
29302950}
29312951
29322952SetTestSuite . test ( " Equatable.Native.Native " ) {
0 commit comments