@@ -2866,67 +2866,87 @@ SetTestSuite.test("isSubsetOf.Set.Set") {
2866
2866
let s2 = Set ( [ 1010 , 2020 , 3030 ] )
2867
2867
expectTrue ( Set < Int > ( ) . isSubset ( of: s1) )
2868
2868
expectFalse ( s1. isSubset ( of: Set < Int > ( ) ) )
2869
+ expectTrue ( Set < Int > ( ) . isSubset ( of: Set < Int > ( ) ) )
2869
2870
expectTrue ( s1. isSubset ( of: s1) )
2871
+ expectFalse ( s1. isSubset ( of: s2) )
2870
2872
expectTrue ( s2. isSubset ( of: s1) )
2871
2873
}
2872
2874
2873
2875
SetTestSuite . 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 ) )
2878
2884
}
2879
2885
2880
2886
SetTestSuite . test ( " isStrictSubsetOf.Set.Set " ) {
2881
2887
let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
2888
+ let s2 = Set ( [ 1010 , 2020 , 3030 ] )
2882
2889
expectTrue ( Set < Int > ( ) . isStrictSubset ( of: s1) )
2883
2890
expectFalse ( s1. isStrictSubset ( of: Set < Int > ( ) ) )
2891
+ expectFalse ( Set < Int > ( ) . isStrictSubset ( of: Set < Int > ( ) ) )
2884
2892
expectFalse ( s1. isStrictSubset ( of: s1) )
2893
+ expectFalse ( s1. isStrictSubset ( of: s2) )
2894
+ expectTrue ( s2. isStrictSubset ( of: s1) )
2885
2895
}
2886
2896
2887
2897
SetTestSuite . 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 ) )
2892
2906
}
2893
2907
2894
2908
SetTestSuite . test ( " isSupersetOf.Set.Set " ) {
2895
2909
let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
2896
2910
let s2 = Set ( [ 1010 , 2020 , 3030 ] )
2897
2911
expectTrue ( s1. isSuperset ( of: Set < Int > ( ) ) )
2898
2912
expectFalse ( Set < Int > ( ) . isSuperset ( of: s1) )
2913
+ expectTrue ( Set < Int > ( ) . isSuperset ( of: Set < Int > ( ) ) )
2899
2914
expectTrue ( s1. isSuperset ( of: s1) )
2900
2915
expectTrue ( s1. isSuperset ( of: s2) )
2901
- expectFalse ( Set < Int > ( ) . isSuperset ( of: s1) )
2916
+ expectFalse ( s2 . isSuperset ( of: s1) )
2902
2917
}
2903
2918
2904
2919
SetTestSuite . 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 ) )
2912
2928
}
2913
2929
2914
- SetTestSuite . test ( " strictSuperset .Set.Set" ) {
2930
+ SetTestSuite . test ( " isStrictSuperset .Set.Set" ) {
2915
2931
let s1 = Set ( [ 1010 , 2020 , 3030 , 4040 , 5050 , 6060 ] )
2916
2932
let s2 = Set ( [ 1010 , 2020 , 3030 ] )
2917
2933
expectTrue ( s1. isStrictSuperset ( of: Set < Int > ( ) ) )
2918
2934
expectFalse ( Set < Int > ( ) . isStrictSuperset ( of: s1) )
2935
+ expectFalse ( Set < Int > ( ) . isStrictSuperset ( of: Set < Int > ( ) ) )
2919
2936
expectFalse ( s1. isStrictSuperset ( of: s1) )
2920
2937
expectTrue ( s1. isStrictSuperset ( of: s2) )
2938
+ expectFalse ( s2. isStrictSuperset ( of: s1) )
2921
2939
}
2922
2940
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 ) )
2930
2950
}
2931
2951
2932
2952
SetTestSuite . test ( " Equatable.Native.Native " ) {
0 commit comments