Skip to content

Commit ac21025

Browse files
authored
fix: Added @ignore to the tests (#674)
[no important files changed]
1 parent f5eb4bc commit ac21025

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

exercises/practice/custom-set/src/test/kotlin/CustomSetTest.kt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import kotlin.test.assertEquals
33
import kotlin.test.assertFalse
44
import kotlin.test.assertNotEquals
55
import kotlin.test.assertTrue
6+
import kotlin.test.Ignore
67

78
class CustomSetTest {
89

@@ -12,128 +13,147 @@ class CustomSetTest {
1213
assertTrue(sut.isEmpty())
1314
}
1415

16+
@Ignore
1517
@Test
1618
fun `sets with elements are not empty`() {
1719
val sut = CustomSet(1)
1820
assertFalse(sut.isEmpty())
1921
}
2022

23+
@Ignore
2124
@Test
2225
fun `nothing is contained in an empty set`() {
2326
val sut = CustomSet()
2427
assertFalse(sut.contains(1))
2528
}
2629

30+
@Ignore
2731
@Test
2832
fun `when the element is in the set`() {
2933
val sut = CustomSet(1, 2, 3)
3034
assertTrue(sut.contains(1))
3135
}
3236

37+
@Ignore
3338
@Test
3439
fun `when the element is not in the set`() {
3540
val sut = CustomSet(1, 2, 3)
3641
assertFalse(sut.contains(4))
3742
}
3843

44+
@Ignore
3945
@Test
4046
fun `empty set is a subset of another empty set`() {
4147
val set1 = CustomSet()
4248
val set2 = CustomSet()
4349
assertTrue(set1.isSubset(set2))
4450
}
4551

52+
@Ignore
4653
@Test
4754
fun `empty set is a subset of non empty set`() {
4855
val set1 = CustomSet()
4956
val set2 = CustomSet(1)
5057
assertTrue(set1.isSubset(set2))
5158
}
5259

60+
@Ignore
5361
@Test
5462
fun `non empty set is not a subset of empty set`() {
5563
val set1 = CustomSet(1)
5664
val set2 = CustomSet()
5765
assertFalse(set1.isSubset(set2))
5866
}
5967

68+
@Ignore
6069
@Test
6170
fun `set is a subset of set with exact same elements`() {
6271
val set1 = CustomSet(1, 2, 3)
6372
val set2 = CustomSet(1, 2, 3)
6473
assertTrue(set1.isSubset(set2))
6574
}
6675

76+
@Ignore
6777
@Test
6878
fun `set is a subset of larger set with same elements`() {
6979
val set1 = CustomSet(1, 2, 3)
7080
val set2 = CustomSet(4, 1, 2, 3)
7181
assertTrue(set1.isSubset(set2))
7282
}
7383

84+
@Ignore
7485
@Test
7586
fun `set is not a subset of set that does not contain its elements`() {
7687
val set1 = CustomSet(1, 2, 3)
7788
val set2 = CustomSet(4, 1, 3)
7889
assertFalse(set1.isSubset(set2))
7990
}
8091

92+
@Ignore
8193
@Test
8294
fun `the empty set is disjoint with itself`() {
8395
val set1 = CustomSet()
8496
val set2 = CustomSet()
8597
assertTrue(set1.isDisjoint(set2))
8698
}
8799

100+
@Ignore
88101
@Test
89102
fun `empty set is disjoint with non empty set`() {
90103
val set1 = CustomSet()
91104
val set2 = CustomSet(1)
92105
assertTrue(set1.isDisjoint(set2))
93106
}
94107

108+
@Ignore
95109
@Test
96110
fun `non empty set is disjoint with empty set`() {
97111
val set1 = CustomSet(1)
98112
val set2 = CustomSet()
99113
assertTrue(set1.isDisjoint(set2))
100114
}
101115

116+
@Ignore
102117
@Test
103118
fun `sets are not disjoint if they share an element`() {
104119
val set1 = CustomSet(1, 2)
105120
val set2 = CustomSet(2, 3)
106121
assertFalse(set1.isDisjoint(set2))
107122
}
108123

124+
@Ignore
109125
@Test
110126
fun `sets are disjoint if they share no elements`() {
111127
val set1 = CustomSet(1, 2)
112128
val set2 = CustomSet(3, 4)
113129
assertTrue(set1.isDisjoint(set2))
114130
}
115131

132+
@Ignore
116133
@Test
117134
fun `empty sets are equal`() {
118135
val set1 = CustomSet()
119136
val set2 = CustomSet()
120137
assertEquals(set1, set2)
121138
}
122139

140+
@Ignore
123141
@Test
124142
fun `empty set is not equal to non empty set`() {
125143
val set1 = CustomSet()
126144
val set2 = CustomSet(1, 2, 3)
127145
assertNotEquals(set1, set2)
128146
}
129147

148+
@Ignore
130149
@Test
131150
fun `non empty set is not equal to empty set`() {
132151
val set1 = CustomSet(1, 2, 3)
133152
val set2 = CustomSet()
134153
assertNotEquals(set1, set2)
135154
}
136155

156+
@Ignore
137157
@Test
138158
fun `sets with the same elements are equal`() {
139159
val set1 = CustomSet(1, 2)
@@ -142,20 +162,23 @@ class CustomSetTest {
142162

143163
}
144164

165+
@Ignore
145166
@Test
146167
fun `sets with different elements are not equal`() {
147168
val set1 = CustomSet(1, 2, 3)
148169
val set2 = CustomSet(1, 2, 4)
149170
assertNotEquals(set1, set2)
150171
}
151172

173+
@Ignore
152174
@Test
153175
fun `set is not equal to larger set with same elements`() {
154176
val set1 = CustomSet(1, 2, 3)
155177
val set2 = CustomSet(1, 2, 3, 4)
156178
assertNotEquals(set1, set2)
157179
}
158180

181+
@Ignore
159182
@Test
160183
fun `add to empty set`() {
161184
val sut = CustomSet()
@@ -164,6 +187,7 @@ class CustomSetTest {
164187
assertEquals(expected, sut)
165188
}
166189

190+
@Ignore
167191
@Test
168192
fun `add to non empty set`() {
169193
val sut = CustomSet(1, 2, 4)
@@ -172,6 +196,7 @@ class CustomSetTest {
172196
assertEquals(expected, sut)
173197
}
174198

199+
@Ignore
175200
@Test
176201
fun `adding an existing element does not change the set`() {
177202
val sut = CustomSet(1, 2, 3)
@@ -180,6 +205,7 @@ class CustomSetTest {
180205
assertEquals(expected, sut)
181206
}
182207

208+
@Ignore
183209
@Test
184210
fun `intersection of two empty sets is an empty set`() {
185211
val set1 = CustomSet()
@@ -188,6 +214,7 @@ class CustomSetTest {
188214
assertEquals(expected, set1.intersection(set2))
189215
}
190216

217+
@Ignore
191218
@Test
192219
fun `intersection of an empty set and non empty set is an empty set`() {
193220
val set1 = CustomSet()
@@ -196,6 +223,7 @@ class CustomSetTest {
196223
assertEquals(expected, set1.intersection(set2))
197224
}
198225

226+
@Ignore
199227
@Test
200228
fun `intersection of a non empty set and an empty set is an empty set`() {
201229
val set1 = CustomSet(1, 2, 3, 4)
@@ -204,6 +232,7 @@ class CustomSetTest {
204232
assertEquals(expected, set1.intersection(set2))
205233
}
206234

235+
@Ignore
207236
@Test
208237
fun `intersection of two sets with no shared elements is an empty set`() {
209238
val set1 = CustomSet(1, 2, 3)
@@ -212,6 +241,7 @@ class CustomSetTest {
212241
assertEquals(expected, set1.intersection(set2))
213242
}
214243

244+
@Ignore
215245
@Test
216246
fun `intersection of two sets with shared elements is a set of the shared elements`() {
217247
val set1 = CustomSet(1, 2, 3, 4)
@@ -220,6 +250,7 @@ class CustomSetTest {
220250
assertEquals(expected, set1.intersection(set2))
221251
}
222252

253+
@Ignore
223254
@Test
224255
fun `difference of two empty sets is an empty set`() {
225256
val set1 = CustomSet()
@@ -228,6 +259,7 @@ class CustomSetTest {
228259
assertEquals(expected, set1 - set2)
229260
}
230261

262+
@Ignore
231263
@Test
232264
fun `difference of empty set and non empty set is an empty set`() {
233265
val set1 = CustomSet()
@@ -236,6 +268,7 @@ class CustomSetTest {
236268
assertEquals(expected, set1 - set2)
237269
}
238270

271+
@Ignore
239272
@Test
240273
fun `difference of a non empty set and an empty set is the non empty set`() {
241274
val set1 = CustomSet(1, 2, 3, 4)
@@ -244,6 +277,7 @@ class CustomSetTest {
244277
assertEquals(expected, set1 - set2)
245278
}
246279

280+
@Ignore
247281
@Test
248282
fun `difference of two non empty sets is a set of elements that are only in the first set`() {
249283
val set1 = CustomSet(3, 2, 1)
@@ -252,6 +286,7 @@ class CustomSetTest {
252286
assertEquals(expected, set1 - set2)
253287
}
254288

289+
@Ignore
255290
@Test
256291
fun `union of empty sets is an empty set`() {
257292
val set1 = CustomSet()
@@ -260,6 +295,7 @@ class CustomSetTest {
260295
assertEquals(expected, set1 + set2)
261296
}
262297

298+
@Ignore
263299
@Test
264300
fun `union of an empty set and non empty set is the non empty set`() {
265301
val set1 = CustomSet()
@@ -268,6 +304,7 @@ class CustomSetTest {
268304
assertEquals(expected, set1 + set2)
269305
}
270306

307+
@Ignore
271308
@Test
272309
fun `union of a non empty set and empty set is the non empty set`() {
273310
val set1 = CustomSet(1, 3)
@@ -276,6 +313,7 @@ class CustomSetTest {
276313
assertEquals(expected, set1 + set2)
277314
}
278315

316+
@Ignore
279317
@Test
280318
fun `union of non empty sets contains all unique elements`() {
281319
val set1 = CustomSet(1, 3)

0 commit comments

Comments
 (0)