@@ -3,6 +3,7 @@ import kotlin.test.assertEquals
3
3
import kotlin.test.assertFalse
4
4
import kotlin.test.assertNotEquals
5
5
import kotlin.test.assertTrue
6
+ import kotlin.test.Ignore
6
7
7
8
class CustomSetTest {
8
9
@@ -12,128 +13,147 @@ class CustomSetTest {
12
13
assertTrue(sut.isEmpty())
13
14
}
14
15
16
+ @Ignore
15
17
@Test
16
18
fun `sets with elements are not empty` () {
17
19
val sut = CustomSet (1 )
18
20
assertFalse(sut.isEmpty())
19
21
}
20
22
23
+ @Ignore
21
24
@Test
22
25
fun `nothing is contained in an empty set` () {
23
26
val sut = CustomSet ()
24
27
assertFalse(sut.contains(1 ))
25
28
}
26
29
30
+ @Ignore
27
31
@Test
28
32
fun `when the element is in the set` () {
29
33
val sut = CustomSet (1 , 2 , 3 )
30
34
assertTrue(sut.contains(1 ))
31
35
}
32
36
37
+ @Ignore
33
38
@Test
34
39
fun `when the element is not in the set` () {
35
40
val sut = CustomSet (1 , 2 , 3 )
36
41
assertFalse(sut.contains(4 ))
37
42
}
38
43
44
+ @Ignore
39
45
@Test
40
46
fun `empty set is a subset of another empty set` () {
41
47
val set1 = CustomSet ()
42
48
val set2 = CustomSet ()
43
49
assertTrue(set1.isSubset(set2))
44
50
}
45
51
52
+ @Ignore
46
53
@Test
47
54
fun `empty set is a subset of non empty set` () {
48
55
val set1 = CustomSet ()
49
56
val set2 = CustomSet (1 )
50
57
assertTrue(set1.isSubset(set2))
51
58
}
52
59
60
+ @Ignore
53
61
@Test
54
62
fun `non empty set is not a subset of empty set` () {
55
63
val set1 = CustomSet (1 )
56
64
val set2 = CustomSet ()
57
65
assertFalse(set1.isSubset(set2))
58
66
}
59
67
68
+ @Ignore
60
69
@Test
61
70
fun `set is a subset of set with exact same elements` () {
62
71
val set1 = CustomSet (1 , 2 , 3 )
63
72
val set2 = CustomSet (1 , 2 , 3 )
64
73
assertTrue(set1.isSubset(set2))
65
74
}
66
75
76
+ @Ignore
67
77
@Test
68
78
fun `set is a subset of larger set with same elements` () {
69
79
val set1 = CustomSet (1 , 2 , 3 )
70
80
val set2 = CustomSet (4 , 1 , 2 , 3 )
71
81
assertTrue(set1.isSubset(set2))
72
82
}
73
83
84
+ @Ignore
74
85
@Test
75
86
fun `set is not a subset of set that does not contain its elements` () {
76
87
val set1 = CustomSet (1 , 2 , 3 )
77
88
val set2 = CustomSet (4 , 1 , 3 )
78
89
assertFalse(set1.isSubset(set2))
79
90
}
80
91
92
+ @Ignore
81
93
@Test
82
94
fun `the empty set is disjoint with itself` () {
83
95
val set1 = CustomSet ()
84
96
val set2 = CustomSet ()
85
97
assertTrue(set1.isDisjoint(set2))
86
98
}
87
99
100
+ @Ignore
88
101
@Test
89
102
fun `empty set is disjoint with non empty set` () {
90
103
val set1 = CustomSet ()
91
104
val set2 = CustomSet (1 )
92
105
assertTrue(set1.isDisjoint(set2))
93
106
}
94
107
108
+ @Ignore
95
109
@Test
96
110
fun `non empty set is disjoint with empty set` () {
97
111
val set1 = CustomSet (1 )
98
112
val set2 = CustomSet ()
99
113
assertTrue(set1.isDisjoint(set2))
100
114
}
101
115
116
+ @Ignore
102
117
@Test
103
118
fun `sets are not disjoint if they share an element` () {
104
119
val set1 = CustomSet (1 , 2 )
105
120
val set2 = CustomSet (2 , 3 )
106
121
assertFalse(set1.isDisjoint(set2))
107
122
}
108
123
124
+ @Ignore
109
125
@Test
110
126
fun `sets are disjoint if they share no elements` () {
111
127
val set1 = CustomSet (1 , 2 )
112
128
val set2 = CustomSet (3 , 4 )
113
129
assertTrue(set1.isDisjoint(set2))
114
130
}
115
131
132
+ @Ignore
116
133
@Test
117
134
fun `empty sets are equal` () {
118
135
val set1 = CustomSet ()
119
136
val set2 = CustomSet ()
120
137
assertEquals(set1, set2)
121
138
}
122
139
140
+ @Ignore
123
141
@Test
124
142
fun `empty set is not equal to non empty set` () {
125
143
val set1 = CustomSet ()
126
144
val set2 = CustomSet (1 , 2 , 3 )
127
145
assertNotEquals(set1, set2)
128
146
}
129
147
148
+ @Ignore
130
149
@Test
131
150
fun `non empty set is not equal to empty set` () {
132
151
val set1 = CustomSet (1 , 2 , 3 )
133
152
val set2 = CustomSet ()
134
153
assertNotEquals(set1, set2)
135
154
}
136
155
156
+ @Ignore
137
157
@Test
138
158
fun `sets with the same elements are equal` () {
139
159
val set1 = CustomSet (1 , 2 )
@@ -142,20 +162,23 @@ class CustomSetTest {
142
162
143
163
}
144
164
165
+ @Ignore
145
166
@Test
146
167
fun `sets with different elements are not equal` () {
147
168
val set1 = CustomSet (1 , 2 , 3 )
148
169
val set2 = CustomSet (1 , 2 , 4 )
149
170
assertNotEquals(set1, set2)
150
171
}
151
172
173
+ @Ignore
152
174
@Test
153
175
fun `set is not equal to larger set with same elements` () {
154
176
val set1 = CustomSet (1 , 2 , 3 )
155
177
val set2 = CustomSet (1 , 2 , 3 , 4 )
156
178
assertNotEquals(set1, set2)
157
179
}
158
180
181
+ @Ignore
159
182
@Test
160
183
fun `add to empty set` () {
161
184
val sut = CustomSet ()
@@ -164,6 +187,7 @@ class CustomSetTest {
164
187
assertEquals(expected, sut)
165
188
}
166
189
190
+ @Ignore
167
191
@Test
168
192
fun `add to non empty set` () {
169
193
val sut = CustomSet (1 , 2 , 4 )
@@ -172,6 +196,7 @@ class CustomSetTest {
172
196
assertEquals(expected, sut)
173
197
}
174
198
199
+ @Ignore
175
200
@Test
176
201
fun `adding an existing element does not change the set` () {
177
202
val sut = CustomSet (1 , 2 , 3 )
@@ -180,6 +205,7 @@ class CustomSetTest {
180
205
assertEquals(expected, sut)
181
206
}
182
207
208
+ @Ignore
183
209
@Test
184
210
fun `intersection of two empty sets is an empty set` () {
185
211
val set1 = CustomSet ()
@@ -188,6 +214,7 @@ class CustomSetTest {
188
214
assertEquals(expected, set1.intersection(set2))
189
215
}
190
216
217
+ @Ignore
191
218
@Test
192
219
fun `intersection of an empty set and non empty set is an empty set` () {
193
220
val set1 = CustomSet ()
@@ -196,6 +223,7 @@ class CustomSetTest {
196
223
assertEquals(expected, set1.intersection(set2))
197
224
}
198
225
226
+ @Ignore
199
227
@Test
200
228
fun `intersection of a non empty set and an empty set is an empty set` () {
201
229
val set1 = CustomSet (1 , 2 , 3 , 4 )
@@ -204,6 +232,7 @@ class CustomSetTest {
204
232
assertEquals(expected, set1.intersection(set2))
205
233
}
206
234
235
+ @Ignore
207
236
@Test
208
237
fun `intersection of two sets with no shared elements is an empty set` () {
209
238
val set1 = CustomSet (1 , 2 , 3 )
@@ -212,6 +241,7 @@ class CustomSetTest {
212
241
assertEquals(expected, set1.intersection(set2))
213
242
}
214
243
244
+ @Ignore
215
245
@Test
216
246
fun `intersection of two sets with shared elements is a set of the shared elements` () {
217
247
val set1 = CustomSet (1 , 2 , 3 , 4 )
@@ -220,6 +250,7 @@ class CustomSetTest {
220
250
assertEquals(expected, set1.intersection(set2))
221
251
}
222
252
253
+ @Ignore
223
254
@Test
224
255
fun `difference of two empty sets is an empty set` () {
225
256
val set1 = CustomSet ()
@@ -228,6 +259,7 @@ class CustomSetTest {
228
259
assertEquals(expected, set1 - set2)
229
260
}
230
261
262
+ @Ignore
231
263
@Test
232
264
fun `difference of empty set and non empty set is an empty set` () {
233
265
val set1 = CustomSet ()
@@ -236,6 +268,7 @@ class CustomSetTest {
236
268
assertEquals(expected, set1 - set2)
237
269
}
238
270
271
+ @Ignore
239
272
@Test
240
273
fun `difference of a non empty set and an empty set is the non empty set` () {
241
274
val set1 = CustomSet (1 , 2 , 3 , 4 )
@@ -244,6 +277,7 @@ class CustomSetTest {
244
277
assertEquals(expected, set1 - set2)
245
278
}
246
279
280
+ @Ignore
247
281
@Test
248
282
fun `difference of two non empty sets is a set of elements that are only in the first set` () {
249
283
val set1 = CustomSet (3 , 2 , 1 )
@@ -252,6 +286,7 @@ class CustomSetTest {
252
286
assertEquals(expected, set1 - set2)
253
287
}
254
288
289
+ @Ignore
255
290
@Test
256
291
fun `union of empty sets is an empty set` () {
257
292
val set1 = CustomSet ()
@@ -260,6 +295,7 @@ class CustomSetTest {
260
295
assertEquals(expected, set1 + set2)
261
296
}
262
297
298
+ @Ignore
263
299
@Test
264
300
fun `union of an empty set and non empty set is the non empty set` () {
265
301
val set1 = CustomSet ()
@@ -268,6 +304,7 @@ class CustomSetTest {
268
304
assertEquals(expected, set1 + set2)
269
305
}
270
306
307
+ @Ignore
271
308
@Test
272
309
fun `union of a non empty set and empty set is the non empty set` () {
273
310
val set1 = CustomSet (1 , 3 )
@@ -276,6 +313,7 @@ class CustomSetTest {
276
313
assertEquals(expected, set1 + set2)
277
314
}
278
315
316
+ @Ignore
279
317
@Test
280
318
fun `union of non empty sets contains all unique elements` () {
281
319
val set1 = CustomSet (1 , 3 )
0 commit comments