A game about forced loneliness, made by TACStudios
1using System;
2using NUnit.Framework;
3using Unity.Collections;
4using Unity.Collections.LowLevel.Unsafe;
5using Unity.Collections.Tests;
6
7internal class NativeHashSetTestsGenerated : CollectionsTestFixture
8{
9 static void ExpectedCount<T>(ref NativeHashSet<T> container, int expected)
10 where T : unmanaged, IEquatable<T>
11 {
12 Assert.AreEqual(expected == 0, container.IsEmpty);
13 Assert.AreEqual(expected, container.Count);
14 }
15
16
17 [Test]
18 public void NativeHashSet_NativeHashSet_EIU_ExceptWith_Empty()
19 {
20 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
21 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
22 container.ExceptWith(other);
23
24 ExpectedCount(ref container, 0);
25
26 container.Dispose();
27 other.Dispose();
28 }
29
30 [Test]
31 public void NativeHashSet_NativeHashSet_EIU_ExceptWith_AxB()
32 {
33 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
34 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
35 container.ExceptWith(other);
36
37 ExpectedCount(ref container, 3);
38 Assert.True(container.Contains(0));
39 Assert.True(container.Contains(1));
40 Assert.True(container.Contains(2));
41
42 container.Dispose();
43 other.Dispose();
44 }
45
46 [Test]
47 public void NativeHashSet_NativeHashSet_EIU_IntersectWith_Empty()
48 {
49 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
50 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
51 container.IntersectWith(other);
52
53 ExpectedCount(ref container, 0);
54
55 container.Dispose();
56 other.Dispose();
57 }
58
59 [Test]
60 public void NativeHashSet_NativeHashSet_EIU_IntersectWith()
61 {
62 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
63 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
64 container.IntersectWith(other);
65
66 ExpectedCount(ref container, 3);
67 Assert.True(container.Contains(3));
68 Assert.True(container.Contains(4));
69 Assert.True(container.Contains(5));
70
71 container.Dispose();
72 other.Dispose();
73 }
74
75 [Test]
76 public void NativeHashSet_NativeHashSet_EIU_UnionWith_Empty()
77 {
78 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
79 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
80 container.UnionWith(other);
81
82 ExpectedCount(ref container, 0);
83
84 container.Dispose();
85 other.Dispose();
86 }
87
88 [Test]
89 public void NativeHashSet_NativeHashSet_EIU_UnionWith()
90 {
91 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
92 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
93 container.UnionWith(other);
94
95 ExpectedCount(ref container, 9);
96 Assert.True(container.Contains(0));
97 Assert.True(container.Contains(1));
98 Assert.True(container.Contains(2));
99 Assert.True(container.Contains(3));
100 Assert.True(container.Contains(4));
101 Assert.True(container.Contains(5));
102 Assert.True(container.Contains(6));
103 Assert.True(container.Contains(7));
104 Assert.True(container.Contains(8));
105
106 container.Dispose();
107 other.Dispose();
108 }
109
110
111 [Test]
112 public void NativeHashSet_UnsafeHashSet_EIU_ExceptWith_Empty()
113 {
114 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
115 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
116 container.ExceptWith(other);
117
118 ExpectedCount(ref container, 0);
119
120 container.Dispose();
121 other.Dispose();
122 }
123
124 [Test]
125 public void NativeHashSet_UnsafeHashSet_EIU_ExceptWith_AxB()
126 {
127 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
128 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
129 container.ExceptWith(other);
130
131 ExpectedCount(ref container, 3);
132 Assert.True(container.Contains(0));
133 Assert.True(container.Contains(1));
134 Assert.True(container.Contains(2));
135
136 container.Dispose();
137 other.Dispose();
138 }
139
140 [Test]
141 public void NativeHashSet_UnsafeHashSet_EIU_IntersectWith_Empty()
142 {
143 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
144 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
145 container.IntersectWith(other);
146
147 ExpectedCount(ref container, 0);
148
149 container.Dispose();
150 other.Dispose();
151 }
152
153 [Test]
154 public void NativeHashSet_UnsafeHashSet_EIU_IntersectWith()
155 {
156 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
157 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
158 container.IntersectWith(other);
159
160 ExpectedCount(ref container, 3);
161 Assert.True(container.Contains(3));
162 Assert.True(container.Contains(4));
163 Assert.True(container.Contains(5));
164
165 container.Dispose();
166 other.Dispose();
167 }
168
169 [Test]
170 public void NativeHashSet_UnsafeHashSet_EIU_UnionWith_Empty()
171 {
172 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
173 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
174 container.UnionWith(other);
175
176 ExpectedCount(ref container, 0);
177
178 container.Dispose();
179 other.Dispose();
180 }
181
182 [Test]
183 public void NativeHashSet_UnsafeHashSet_EIU_UnionWith()
184 {
185 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
186 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
187 container.UnionWith(other);
188
189 ExpectedCount(ref container, 9);
190 Assert.True(container.Contains(0));
191 Assert.True(container.Contains(1));
192 Assert.True(container.Contains(2));
193 Assert.True(container.Contains(3));
194 Assert.True(container.Contains(4));
195 Assert.True(container.Contains(5));
196 Assert.True(container.Contains(6));
197 Assert.True(container.Contains(7));
198 Assert.True(container.Contains(8));
199
200 container.Dispose();
201 other.Dispose();
202 }
203
204
205 [Test]
206 public void NativeHashSet_NativeParallelHashSet_EIU_ExceptWith_Empty()
207 {
208 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
209 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
210 container.ExceptWith(other);
211
212 ExpectedCount(ref container, 0);
213
214 container.Dispose();
215 other.Dispose();
216 }
217
218 [Test]
219 public void NativeHashSet_NativeParallelHashSet_EIU_ExceptWith_AxB()
220 {
221 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
222 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
223 container.ExceptWith(other);
224
225 ExpectedCount(ref container, 3);
226 Assert.True(container.Contains(0));
227 Assert.True(container.Contains(1));
228 Assert.True(container.Contains(2));
229
230 container.Dispose();
231 other.Dispose();
232 }
233
234 [Test]
235 public void NativeHashSet_NativeParallelHashSet_EIU_IntersectWith_Empty()
236 {
237 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
238 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
239 container.IntersectWith(other);
240
241 ExpectedCount(ref container, 0);
242
243 container.Dispose();
244 other.Dispose();
245 }
246
247 [Test]
248 public void NativeHashSet_NativeParallelHashSet_EIU_IntersectWith()
249 {
250 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
251 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
252 container.IntersectWith(other);
253
254 ExpectedCount(ref container, 3);
255 Assert.True(container.Contains(3));
256 Assert.True(container.Contains(4));
257 Assert.True(container.Contains(5));
258
259 container.Dispose();
260 other.Dispose();
261 }
262
263 [Test]
264 public void NativeHashSet_NativeParallelHashSet_EIU_UnionWith_Empty()
265 {
266 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
267 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
268 container.UnionWith(other);
269
270 ExpectedCount(ref container, 0);
271
272 container.Dispose();
273 other.Dispose();
274 }
275
276 [Test]
277 public void NativeHashSet_NativeParallelHashSet_EIU_UnionWith()
278 {
279 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
280 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
281 container.UnionWith(other);
282
283 ExpectedCount(ref container, 9);
284 Assert.True(container.Contains(0));
285 Assert.True(container.Contains(1));
286 Assert.True(container.Contains(2));
287 Assert.True(container.Contains(3));
288 Assert.True(container.Contains(4));
289 Assert.True(container.Contains(5));
290 Assert.True(container.Contains(6));
291 Assert.True(container.Contains(7));
292 Assert.True(container.Contains(8));
293
294 container.Dispose();
295 other.Dispose();
296 }
297
298
299 [Test]
300 public void NativeHashSet_UnsafeParallelHashSet_EIU_ExceptWith_Empty()
301 {
302 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
303 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
304 container.ExceptWith(other);
305
306 ExpectedCount(ref container, 0);
307
308 container.Dispose();
309 other.Dispose();
310 }
311
312 [Test]
313 public void NativeHashSet_UnsafeParallelHashSet_EIU_ExceptWith_AxB()
314 {
315 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
316 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
317 container.ExceptWith(other);
318
319 ExpectedCount(ref container, 3);
320 Assert.True(container.Contains(0));
321 Assert.True(container.Contains(1));
322 Assert.True(container.Contains(2));
323
324 container.Dispose();
325 other.Dispose();
326 }
327
328 [Test]
329 public void NativeHashSet_UnsafeParallelHashSet_EIU_IntersectWith_Empty()
330 {
331 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
332 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
333 container.IntersectWith(other);
334
335 ExpectedCount(ref container, 0);
336
337 container.Dispose();
338 other.Dispose();
339 }
340
341 [Test]
342 public void NativeHashSet_UnsafeParallelHashSet_EIU_IntersectWith()
343 {
344 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
345 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
346 container.IntersectWith(other);
347
348 ExpectedCount(ref container, 3);
349 Assert.True(container.Contains(3));
350 Assert.True(container.Contains(4));
351 Assert.True(container.Contains(5));
352
353 container.Dispose();
354 other.Dispose();
355 }
356
357 [Test]
358 public void NativeHashSet_UnsafeParallelHashSet_EIU_UnionWith_Empty()
359 {
360 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
361 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
362 container.UnionWith(other);
363
364 ExpectedCount(ref container, 0);
365
366 container.Dispose();
367 other.Dispose();
368 }
369
370 [Test]
371 public void NativeHashSet_UnsafeParallelHashSet_EIU_UnionWith()
372 {
373 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
374 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
375 container.UnionWith(other);
376
377 ExpectedCount(ref container, 9);
378 Assert.True(container.Contains(0));
379 Assert.True(container.Contains(1));
380 Assert.True(container.Contains(2));
381 Assert.True(container.Contains(3));
382 Assert.True(container.Contains(4));
383 Assert.True(container.Contains(5));
384 Assert.True(container.Contains(6));
385 Assert.True(container.Contains(7));
386 Assert.True(container.Contains(8));
387
388 container.Dispose();
389 other.Dispose();
390 }
391
392
393 [Test]
394 public void NativeHashSet_NativeList_EIU_ExceptWith_Empty()
395 {
396 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
397 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { };
398 container.ExceptWith(other);
399
400 ExpectedCount(ref container, 0);
401
402 container.Dispose();
403 other.Dispose();
404 }
405
406 [Test]
407 public void NativeHashSet_NativeList_EIU_ExceptWith_AxB()
408 {
409 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
410 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
411 container.ExceptWith(other);
412
413 ExpectedCount(ref container, 3);
414 Assert.True(container.Contains(0));
415 Assert.True(container.Contains(1));
416 Assert.True(container.Contains(2));
417
418 container.Dispose();
419 other.Dispose();
420 }
421
422 [Test]
423 public void NativeHashSet_NativeList_EIU_IntersectWith_Empty()
424 {
425 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
426 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { };
427 container.IntersectWith(other);
428
429 ExpectedCount(ref container, 0);
430
431 container.Dispose();
432 other.Dispose();
433 }
434
435 [Test]
436 public void NativeHashSet_NativeList_EIU_IntersectWith()
437 {
438 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
439 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
440 container.IntersectWith(other);
441
442 ExpectedCount(ref container, 3);
443 Assert.True(container.Contains(3));
444 Assert.True(container.Contains(4));
445 Assert.True(container.Contains(5));
446
447 container.Dispose();
448 other.Dispose();
449 }
450
451 [Test]
452 public void NativeHashSet_NativeList_EIU_UnionWith_Empty()
453 {
454 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
455 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { };
456 container.UnionWith(other);
457
458 ExpectedCount(ref container, 0);
459
460 container.Dispose();
461 other.Dispose();
462 }
463
464 [Test]
465 public void NativeHashSet_NativeList_EIU_UnionWith()
466 {
467 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
468 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
469 container.UnionWith(other);
470
471 ExpectedCount(ref container, 9);
472 Assert.True(container.Contains(0));
473 Assert.True(container.Contains(1));
474 Assert.True(container.Contains(2));
475 Assert.True(container.Contains(3));
476 Assert.True(container.Contains(4));
477 Assert.True(container.Contains(5));
478 Assert.True(container.Contains(6));
479 Assert.True(container.Contains(7));
480 Assert.True(container.Contains(8));
481
482 container.Dispose();
483 other.Dispose();
484 }
485
486
487 [Test]
488 public void NativeHashSet_UnsafeList_EIU_ExceptWith_Empty()
489 {
490 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
491 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { };
492 container.ExceptWith(other);
493
494 ExpectedCount(ref container, 0);
495
496 container.Dispose();
497 other.Dispose();
498 }
499
500 [Test]
501 public void NativeHashSet_UnsafeList_EIU_ExceptWith_AxB()
502 {
503 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
504 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
505 container.ExceptWith(other);
506
507 ExpectedCount(ref container, 3);
508 Assert.True(container.Contains(0));
509 Assert.True(container.Contains(1));
510 Assert.True(container.Contains(2));
511
512 container.Dispose();
513 other.Dispose();
514 }
515
516 [Test]
517 public void NativeHashSet_UnsafeList_EIU_IntersectWith_Empty()
518 {
519 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
520 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { };
521 container.IntersectWith(other);
522
523 ExpectedCount(ref container, 0);
524
525 container.Dispose();
526 other.Dispose();
527 }
528
529 [Test]
530 public void NativeHashSet_UnsafeList_EIU_IntersectWith()
531 {
532 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
533 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
534 container.IntersectWith(other);
535
536 ExpectedCount(ref container, 3);
537 Assert.True(container.Contains(3));
538 Assert.True(container.Contains(4));
539 Assert.True(container.Contains(5));
540
541 container.Dispose();
542 other.Dispose();
543 }
544
545 [Test]
546 public void NativeHashSet_UnsafeList_EIU_UnionWith_Empty()
547 {
548 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
549 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { };
550 container.UnionWith(other);
551
552 ExpectedCount(ref container, 0);
553
554 container.Dispose();
555 other.Dispose();
556 }
557
558 [Test]
559 public void NativeHashSet_UnsafeList_EIU_UnionWith()
560 {
561 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
562 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
563 container.UnionWith(other);
564
565 ExpectedCount(ref container, 9);
566 Assert.True(container.Contains(0));
567 Assert.True(container.Contains(1));
568 Assert.True(container.Contains(2));
569 Assert.True(container.Contains(3));
570 Assert.True(container.Contains(4));
571 Assert.True(container.Contains(5));
572 Assert.True(container.Contains(6));
573 Assert.True(container.Contains(7));
574 Assert.True(container.Contains(8));
575
576 container.Dispose();
577 other.Dispose();
578 }
579
580
581 [Test]
582 public void NativeHashSet_FixedList32Bytes_EIU_ExceptWith_Empty()
583 {
584 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
585 var other = new FixedList32Bytes<int>() { };
586 container.ExceptWith(other);
587
588 ExpectedCount(ref container, 0);
589
590 container.Dispose();
591 }
592
593 [Test]
594 public void NativeHashSet_FixedList32Bytes_EIU_ExceptWith_AxB()
595 {
596 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
597 var other = new FixedList32Bytes<int>() { 3, 4, 5, 6, 7, 8 };
598 container.ExceptWith(other);
599
600 ExpectedCount(ref container, 3);
601 Assert.True(container.Contains(0));
602 Assert.True(container.Contains(1));
603 Assert.True(container.Contains(2));
604
605 container.Dispose();
606 }
607
608 [Test]
609 public void NativeHashSet_FixedList32Bytes_EIU_IntersectWith_Empty()
610 {
611 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
612 var other = new FixedList32Bytes<int>() { };
613 container.IntersectWith(other);
614
615 ExpectedCount(ref container, 0);
616
617 container.Dispose();
618 }
619
620 [Test]
621 public void NativeHashSet_FixedList32Bytes_EIU_IntersectWith()
622 {
623 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
624 var other = new FixedList32Bytes<int>() { 3, 4, 5, 6, 7, 8 };
625 container.IntersectWith(other);
626
627 ExpectedCount(ref container, 3);
628 Assert.True(container.Contains(3));
629 Assert.True(container.Contains(4));
630 Assert.True(container.Contains(5));
631
632 container.Dispose();
633 }
634
635 [Test]
636 public void NativeHashSet_FixedList32Bytes_EIU_UnionWith_Empty()
637 {
638 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
639 var other = new FixedList32Bytes<int>() { };
640 container.UnionWith(other);
641
642 ExpectedCount(ref container, 0);
643
644 container.Dispose();
645 }
646
647 [Test]
648 public void NativeHashSet_FixedList32Bytes_EIU_UnionWith()
649 {
650 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
651 var other = new FixedList32Bytes<int>() { 3, 4, 5, 6, 7, 8 };
652 container.UnionWith(other);
653
654 ExpectedCount(ref container, 9);
655 Assert.True(container.Contains(0));
656 Assert.True(container.Contains(1));
657 Assert.True(container.Contains(2));
658 Assert.True(container.Contains(3));
659 Assert.True(container.Contains(4));
660 Assert.True(container.Contains(5));
661 Assert.True(container.Contains(6));
662 Assert.True(container.Contains(7));
663 Assert.True(container.Contains(8));
664
665 container.Dispose();
666 }
667 [Test]
668 public void NativeHashSet_FixedList64Bytes_EIU_ExceptWith_Empty()
669 {
670 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
671 var other = new FixedList64Bytes<int>() { };
672 container.ExceptWith(other);
673
674 ExpectedCount(ref container, 0);
675
676 container.Dispose();
677 }
678
679 [Test]
680 public void NativeHashSet_FixedList64Bytes_EIU_ExceptWith_AxB()
681 {
682 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
683 var other = new FixedList64Bytes<int>() { 3, 4, 5, 6, 7, 8 };
684 container.ExceptWith(other);
685
686 ExpectedCount(ref container, 3);
687 Assert.True(container.Contains(0));
688 Assert.True(container.Contains(1));
689 Assert.True(container.Contains(2));
690
691 container.Dispose();
692 }
693
694 [Test]
695 public void NativeHashSet_FixedList64Bytes_EIU_IntersectWith_Empty()
696 {
697 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
698 var other = new FixedList64Bytes<int>() { };
699 container.IntersectWith(other);
700
701 ExpectedCount(ref container, 0);
702
703 container.Dispose();
704 }
705
706 [Test]
707 public void NativeHashSet_FixedList64Bytes_EIU_IntersectWith()
708 {
709 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
710 var other = new FixedList64Bytes<int>() { 3, 4, 5, 6, 7, 8 };
711 container.IntersectWith(other);
712
713 ExpectedCount(ref container, 3);
714 Assert.True(container.Contains(3));
715 Assert.True(container.Contains(4));
716 Assert.True(container.Contains(5));
717
718 container.Dispose();
719 }
720
721 [Test]
722 public void NativeHashSet_FixedList64Bytes_EIU_UnionWith_Empty()
723 {
724 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
725 var other = new FixedList64Bytes<int>() { };
726 container.UnionWith(other);
727
728 ExpectedCount(ref container, 0);
729
730 container.Dispose();
731 }
732
733 [Test]
734 public void NativeHashSet_FixedList64Bytes_EIU_UnionWith()
735 {
736 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
737 var other = new FixedList64Bytes<int>() { 3, 4, 5, 6, 7, 8 };
738 container.UnionWith(other);
739
740 ExpectedCount(ref container, 9);
741 Assert.True(container.Contains(0));
742 Assert.True(container.Contains(1));
743 Assert.True(container.Contains(2));
744 Assert.True(container.Contains(3));
745 Assert.True(container.Contains(4));
746 Assert.True(container.Contains(5));
747 Assert.True(container.Contains(6));
748 Assert.True(container.Contains(7));
749 Assert.True(container.Contains(8));
750
751 container.Dispose();
752 }
753 [Test]
754 public void NativeHashSet_FixedList128Bytes_EIU_ExceptWith_Empty()
755 {
756 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
757 var other = new FixedList128Bytes<int>() { };
758 container.ExceptWith(other);
759
760 ExpectedCount(ref container, 0);
761
762 container.Dispose();
763 }
764
765 [Test]
766 public void NativeHashSet_FixedList128Bytes_EIU_ExceptWith_AxB()
767 {
768 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
769 var other = new FixedList128Bytes<int>() { 3, 4, 5, 6, 7, 8 };
770 container.ExceptWith(other);
771
772 ExpectedCount(ref container, 3);
773 Assert.True(container.Contains(0));
774 Assert.True(container.Contains(1));
775 Assert.True(container.Contains(2));
776
777 container.Dispose();
778 }
779
780 [Test]
781 public void NativeHashSet_FixedList128Bytes_EIU_IntersectWith_Empty()
782 {
783 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
784 var other = new FixedList128Bytes<int>() { };
785 container.IntersectWith(other);
786
787 ExpectedCount(ref container, 0);
788
789 container.Dispose();
790 }
791
792 [Test]
793 public void NativeHashSet_FixedList128Bytes_EIU_IntersectWith()
794 {
795 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
796 var other = new FixedList128Bytes<int>() { 3, 4, 5, 6, 7, 8 };
797 container.IntersectWith(other);
798
799 ExpectedCount(ref container, 3);
800 Assert.True(container.Contains(3));
801 Assert.True(container.Contains(4));
802 Assert.True(container.Contains(5));
803
804 container.Dispose();
805 }
806
807 [Test]
808 public void NativeHashSet_FixedList128Bytes_EIU_UnionWith_Empty()
809 {
810 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
811 var other = new FixedList128Bytes<int>() { };
812 container.UnionWith(other);
813
814 ExpectedCount(ref container, 0);
815
816 container.Dispose();
817 }
818
819 [Test]
820 public void NativeHashSet_FixedList128Bytes_EIU_UnionWith()
821 {
822 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
823 var other = new FixedList128Bytes<int>() { 3, 4, 5, 6, 7, 8 };
824 container.UnionWith(other);
825
826 ExpectedCount(ref container, 9);
827 Assert.True(container.Contains(0));
828 Assert.True(container.Contains(1));
829 Assert.True(container.Contains(2));
830 Assert.True(container.Contains(3));
831 Assert.True(container.Contains(4));
832 Assert.True(container.Contains(5));
833 Assert.True(container.Contains(6));
834 Assert.True(container.Contains(7));
835 Assert.True(container.Contains(8));
836
837 container.Dispose();
838 }
839 [Test]
840 public void NativeHashSet_FixedList512Bytes_EIU_ExceptWith_Empty()
841 {
842 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
843 var other = new FixedList512Bytes<int>() { };
844 container.ExceptWith(other);
845
846 ExpectedCount(ref container, 0);
847
848 container.Dispose();
849 }
850
851 [Test]
852 public void NativeHashSet_FixedList512Bytes_EIU_ExceptWith_AxB()
853 {
854 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
855 var other = new FixedList512Bytes<int>() { 3, 4, 5, 6, 7, 8 };
856 container.ExceptWith(other);
857
858 ExpectedCount(ref container, 3);
859 Assert.True(container.Contains(0));
860 Assert.True(container.Contains(1));
861 Assert.True(container.Contains(2));
862
863 container.Dispose();
864 }
865
866 [Test]
867 public void NativeHashSet_FixedList512Bytes_EIU_IntersectWith_Empty()
868 {
869 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
870 var other = new FixedList512Bytes<int>() { };
871 container.IntersectWith(other);
872
873 ExpectedCount(ref container, 0);
874
875 container.Dispose();
876 }
877
878 [Test]
879 public void NativeHashSet_FixedList512Bytes_EIU_IntersectWith()
880 {
881 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
882 var other = new FixedList512Bytes<int>() { 3, 4, 5, 6, 7, 8 };
883 container.IntersectWith(other);
884
885 ExpectedCount(ref container, 3);
886 Assert.True(container.Contains(3));
887 Assert.True(container.Contains(4));
888 Assert.True(container.Contains(5));
889
890 container.Dispose();
891 }
892
893 [Test]
894 public void NativeHashSet_FixedList512Bytes_EIU_UnionWith_Empty()
895 {
896 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
897 var other = new FixedList512Bytes<int>() { };
898 container.UnionWith(other);
899
900 ExpectedCount(ref container, 0);
901
902 container.Dispose();
903 }
904
905 [Test]
906 public void NativeHashSet_FixedList512Bytes_EIU_UnionWith()
907 {
908 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
909 var other = new FixedList512Bytes<int>() { 3, 4, 5, 6, 7, 8 };
910 container.UnionWith(other);
911
912 ExpectedCount(ref container, 9);
913 Assert.True(container.Contains(0));
914 Assert.True(container.Contains(1));
915 Assert.True(container.Contains(2));
916 Assert.True(container.Contains(3));
917 Assert.True(container.Contains(4));
918 Assert.True(container.Contains(5));
919 Assert.True(container.Contains(6));
920 Assert.True(container.Contains(7));
921 Assert.True(container.Contains(8));
922
923 container.Dispose();
924 }
925 [Test]
926 public void NativeHashSet_FixedList4096Bytes_EIU_ExceptWith_Empty()
927 {
928 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
929 var other = new FixedList4096Bytes<int>() { };
930 container.ExceptWith(other);
931
932 ExpectedCount(ref container, 0);
933
934 container.Dispose();
935 }
936
937 [Test]
938 public void NativeHashSet_FixedList4096Bytes_EIU_ExceptWith_AxB()
939 {
940 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
941 var other = new FixedList4096Bytes<int>() { 3, 4, 5, 6, 7, 8 };
942 container.ExceptWith(other);
943
944 ExpectedCount(ref container, 3);
945 Assert.True(container.Contains(0));
946 Assert.True(container.Contains(1));
947 Assert.True(container.Contains(2));
948
949 container.Dispose();
950 }
951
952 [Test]
953 public void NativeHashSet_FixedList4096Bytes_EIU_IntersectWith_Empty()
954 {
955 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
956 var other = new FixedList4096Bytes<int>() { };
957 container.IntersectWith(other);
958
959 ExpectedCount(ref container, 0);
960
961 container.Dispose();
962 }
963
964 [Test]
965 public void NativeHashSet_FixedList4096Bytes_EIU_IntersectWith()
966 {
967 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
968 var other = new FixedList4096Bytes<int>() { 3, 4, 5, 6, 7, 8 };
969 container.IntersectWith(other);
970
971 ExpectedCount(ref container, 3);
972 Assert.True(container.Contains(3));
973 Assert.True(container.Contains(4));
974 Assert.True(container.Contains(5));
975
976 container.Dispose();
977 }
978
979 [Test]
980 public void NativeHashSet_FixedList4096Bytes_EIU_UnionWith_Empty()
981 {
982 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
983 var other = new FixedList4096Bytes<int>() { };
984 container.UnionWith(other);
985
986 ExpectedCount(ref container, 0);
987
988 container.Dispose();
989 }
990
991 [Test]
992 public void NativeHashSet_FixedList4096Bytes_EIU_UnionWith()
993 {
994 var container = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
995 var other = new FixedList4096Bytes<int>() { 3, 4, 5, 6, 7, 8 };
996 container.UnionWith(other);
997
998 ExpectedCount(ref container, 9);
999 Assert.True(container.Contains(0));
1000 Assert.True(container.Contains(1));
1001 Assert.True(container.Contains(2));
1002 Assert.True(container.Contains(3));
1003 Assert.True(container.Contains(4));
1004 Assert.True(container.Contains(5));
1005 Assert.True(container.Contains(6));
1006 Assert.True(container.Contains(7));
1007 Assert.True(container.Contains(8));
1008
1009 container.Dispose();
1010 }
1011 static void ExpectedCount<T>(ref UnsafeHashSet<T> container, int expected)
1012 where T : unmanaged, IEquatable<T>
1013 {
1014 Assert.AreEqual(expected == 0, container.IsEmpty);
1015 Assert.AreEqual(expected, container.Count);
1016 }
1017
1018
1019 [Test]
1020 public void UnsafeHashSet_NativeHashSet_EIU_ExceptWith_Empty()
1021 {
1022 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1023 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1024 container.ExceptWith(other);
1025
1026 ExpectedCount(ref container, 0);
1027
1028 container.Dispose();
1029 other.Dispose();
1030 }
1031
1032 [Test]
1033 public void UnsafeHashSet_NativeHashSet_EIU_ExceptWith_AxB()
1034 {
1035 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1036 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1037 container.ExceptWith(other);
1038
1039 ExpectedCount(ref container, 3);
1040 Assert.True(container.Contains(0));
1041 Assert.True(container.Contains(1));
1042 Assert.True(container.Contains(2));
1043
1044 container.Dispose();
1045 other.Dispose();
1046 }
1047
1048 [Test]
1049 public void UnsafeHashSet_NativeHashSet_EIU_IntersectWith_Empty()
1050 {
1051 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1052 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1053 container.IntersectWith(other);
1054
1055 ExpectedCount(ref container, 0);
1056
1057 container.Dispose();
1058 other.Dispose();
1059 }
1060
1061 [Test]
1062 public void UnsafeHashSet_NativeHashSet_EIU_IntersectWith()
1063 {
1064 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1065 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1066 container.IntersectWith(other);
1067
1068 ExpectedCount(ref container, 3);
1069 Assert.True(container.Contains(3));
1070 Assert.True(container.Contains(4));
1071 Assert.True(container.Contains(5));
1072
1073 container.Dispose();
1074 other.Dispose();
1075 }
1076
1077 [Test]
1078 public void UnsafeHashSet_NativeHashSet_EIU_UnionWith_Empty()
1079 {
1080 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1081 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1082 container.UnionWith(other);
1083
1084 ExpectedCount(ref container, 0);
1085
1086 container.Dispose();
1087 other.Dispose();
1088 }
1089
1090 [Test]
1091 public void UnsafeHashSet_NativeHashSet_EIU_UnionWith()
1092 {
1093 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1094 var other = new NativeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1095 container.UnionWith(other);
1096
1097 ExpectedCount(ref container, 9);
1098 Assert.True(container.Contains(0));
1099 Assert.True(container.Contains(1));
1100 Assert.True(container.Contains(2));
1101 Assert.True(container.Contains(3));
1102 Assert.True(container.Contains(4));
1103 Assert.True(container.Contains(5));
1104 Assert.True(container.Contains(6));
1105 Assert.True(container.Contains(7));
1106 Assert.True(container.Contains(8));
1107
1108 container.Dispose();
1109 other.Dispose();
1110 }
1111
1112
1113 [Test]
1114 public void UnsafeHashSet_UnsafeHashSet_EIU_ExceptWith_Empty()
1115 {
1116 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1117 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1118 container.ExceptWith(other);
1119
1120 ExpectedCount(ref container, 0);
1121
1122 container.Dispose();
1123 other.Dispose();
1124 }
1125
1126 [Test]
1127 public void UnsafeHashSet_UnsafeHashSet_EIU_ExceptWith_AxB()
1128 {
1129 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1130 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1131 container.ExceptWith(other);
1132
1133 ExpectedCount(ref container, 3);
1134 Assert.True(container.Contains(0));
1135 Assert.True(container.Contains(1));
1136 Assert.True(container.Contains(2));
1137
1138 container.Dispose();
1139 other.Dispose();
1140 }
1141
1142 [Test]
1143 public void UnsafeHashSet_UnsafeHashSet_EIU_IntersectWith_Empty()
1144 {
1145 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1146 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1147 container.IntersectWith(other);
1148
1149 ExpectedCount(ref container, 0);
1150
1151 container.Dispose();
1152 other.Dispose();
1153 }
1154
1155 [Test]
1156 public void UnsafeHashSet_UnsafeHashSet_EIU_IntersectWith()
1157 {
1158 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1159 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1160 container.IntersectWith(other);
1161
1162 ExpectedCount(ref container, 3);
1163 Assert.True(container.Contains(3));
1164 Assert.True(container.Contains(4));
1165 Assert.True(container.Contains(5));
1166
1167 container.Dispose();
1168 other.Dispose();
1169 }
1170
1171 [Test]
1172 public void UnsafeHashSet_UnsafeHashSet_EIU_UnionWith_Empty()
1173 {
1174 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1175 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1176 container.UnionWith(other);
1177
1178 ExpectedCount(ref container, 0);
1179
1180 container.Dispose();
1181 other.Dispose();
1182 }
1183
1184 [Test]
1185 public void UnsafeHashSet_UnsafeHashSet_EIU_UnionWith()
1186 {
1187 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1188 var other = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1189 container.UnionWith(other);
1190
1191 ExpectedCount(ref container, 9);
1192 Assert.True(container.Contains(0));
1193 Assert.True(container.Contains(1));
1194 Assert.True(container.Contains(2));
1195 Assert.True(container.Contains(3));
1196 Assert.True(container.Contains(4));
1197 Assert.True(container.Contains(5));
1198 Assert.True(container.Contains(6));
1199 Assert.True(container.Contains(7));
1200 Assert.True(container.Contains(8));
1201
1202 container.Dispose();
1203 other.Dispose();
1204 }
1205
1206
1207 [Test]
1208 public void UnsafeHashSet_NativeParallelHashSet_EIU_ExceptWith_Empty()
1209 {
1210 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1211 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
1212 container.ExceptWith(other);
1213
1214 ExpectedCount(ref container, 0);
1215
1216 container.Dispose();
1217 other.Dispose();
1218 }
1219
1220 [Test]
1221 public void UnsafeHashSet_NativeParallelHashSet_EIU_ExceptWith_AxB()
1222 {
1223 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1224 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1225 container.ExceptWith(other);
1226
1227 ExpectedCount(ref container, 3);
1228 Assert.True(container.Contains(0));
1229 Assert.True(container.Contains(1));
1230 Assert.True(container.Contains(2));
1231
1232 container.Dispose();
1233 other.Dispose();
1234 }
1235
1236 [Test]
1237 public void UnsafeHashSet_NativeParallelHashSet_EIU_IntersectWith_Empty()
1238 {
1239 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1240 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
1241 container.IntersectWith(other);
1242
1243 ExpectedCount(ref container, 0);
1244
1245 container.Dispose();
1246 other.Dispose();
1247 }
1248
1249 [Test]
1250 public void UnsafeHashSet_NativeParallelHashSet_EIU_IntersectWith()
1251 {
1252 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1253 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1254 container.IntersectWith(other);
1255
1256 ExpectedCount(ref container, 3);
1257 Assert.True(container.Contains(3));
1258 Assert.True(container.Contains(4));
1259 Assert.True(container.Contains(5));
1260
1261 container.Dispose();
1262 other.Dispose();
1263 }
1264
1265 [Test]
1266 public void UnsafeHashSet_NativeParallelHashSet_EIU_UnionWith_Empty()
1267 {
1268 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1269 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
1270 container.UnionWith(other);
1271
1272 ExpectedCount(ref container, 0);
1273
1274 container.Dispose();
1275 other.Dispose();
1276 }
1277
1278 [Test]
1279 public void UnsafeHashSet_NativeParallelHashSet_EIU_UnionWith()
1280 {
1281 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1282 var other = new NativeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1283 container.UnionWith(other);
1284
1285 ExpectedCount(ref container, 9);
1286 Assert.True(container.Contains(0));
1287 Assert.True(container.Contains(1));
1288 Assert.True(container.Contains(2));
1289 Assert.True(container.Contains(3));
1290 Assert.True(container.Contains(4));
1291 Assert.True(container.Contains(5));
1292 Assert.True(container.Contains(6));
1293 Assert.True(container.Contains(7));
1294 Assert.True(container.Contains(8));
1295
1296 container.Dispose();
1297 other.Dispose();
1298 }
1299
1300
1301 [Test]
1302 public void UnsafeHashSet_UnsafeParallelHashSet_EIU_ExceptWith_Empty()
1303 {
1304 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1305 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
1306 container.ExceptWith(other);
1307
1308 ExpectedCount(ref container, 0);
1309
1310 container.Dispose();
1311 other.Dispose();
1312 }
1313
1314 [Test]
1315 public void UnsafeHashSet_UnsafeParallelHashSet_EIU_ExceptWith_AxB()
1316 {
1317 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1318 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1319 container.ExceptWith(other);
1320
1321 ExpectedCount(ref container, 3);
1322 Assert.True(container.Contains(0));
1323 Assert.True(container.Contains(1));
1324 Assert.True(container.Contains(2));
1325
1326 container.Dispose();
1327 other.Dispose();
1328 }
1329
1330 [Test]
1331 public void UnsafeHashSet_UnsafeParallelHashSet_EIU_IntersectWith_Empty()
1332 {
1333 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1334 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
1335 container.IntersectWith(other);
1336
1337 ExpectedCount(ref container, 0);
1338
1339 container.Dispose();
1340 other.Dispose();
1341 }
1342
1343 [Test]
1344 public void UnsafeHashSet_UnsafeParallelHashSet_EIU_IntersectWith()
1345 {
1346 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1347 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1348 container.IntersectWith(other);
1349
1350 ExpectedCount(ref container, 3);
1351 Assert.True(container.Contains(3));
1352 Assert.True(container.Contains(4));
1353 Assert.True(container.Contains(5));
1354
1355 container.Dispose();
1356 other.Dispose();
1357 }
1358
1359 [Test]
1360 public void UnsafeHashSet_UnsafeParallelHashSet_EIU_UnionWith_Empty()
1361 {
1362 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1363 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { };
1364 container.UnionWith(other);
1365
1366 ExpectedCount(ref container, 0);
1367
1368 container.Dispose();
1369 other.Dispose();
1370 }
1371
1372 [Test]
1373 public void UnsafeHashSet_UnsafeParallelHashSet_EIU_UnionWith()
1374 {
1375 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1376 var other = new UnsafeParallelHashSet<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1377 container.UnionWith(other);
1378
1379 ExpectedCount(ref container, 9);
1380 Assert.True(container.Contains(0));
1381 Assert.True(container.Contains(1));
1382 Assert.True(container.Contains(2));
1383 Assert.True(container.Contains(3));
1384 Assert.True(container.Contains(4));
1385 Assert.True(container.Contains(5));
1386 Assert.True(container.Contains(6));
1387 Assert.True(container.Contains(7));
1388 Assert.True(container.Contains(8));
1389
1390 container.Dispose();
1391 other.Dispose();
1392 }
1393
1394
1395 [Test]
1396 public void UnsafeHashSet_NativeList_EIU_ExceptWith_Empty()
1397 {
1398 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1399 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { };
1400 container.ExceptWith(other);
1401
1402 ExpectedCount(ref container, 0);
1403
1404 container.Dispose();
1405 other.Dispose();
1406 }
1407
1408 [Test]
1409 public void UnsafeHashSet_NativeList_EIU_ExceptWith_AxB()
1410 {
1411 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1412 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1413 container.ExceptWith(other);
1414
1415 ExpectedCount(ref container, 3);
1416 Assert.True(container.Contains(0));
1417 Assert.True(container.Contains(1));
1418 Assert.True(container.Contains(2));
1419
1420 container.Dispose();
1421 other.Dispose();
1422 }
1423
1424 [Test]
1425 public void UnsafeHashSet_NativeList_EIU_IntersectWith_Empty()
1426 {
1427 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1428 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { };
1429 container.IntersectWith(other);
1430
1431 ExpectedCount(ref container, 0);
1432
1433 container.Dispose();
1434 other.Dispose();
1435 }
1436
1437 [Test]
1438 public void UnsafeHashSet_NativeList_EIU_IntersectWith()
1439 {
1440 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1441 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1442 container.IntersectWith(other);
1443
1444 ExpectedCount(ref container, 3);
1445 Assert.True(container.Contains(3));
1446 Assert.True(container.Contains(4));
1447 Assert.True(container.Contains(5));
1448
1449 container.Dispose();
1450 other.Dispose();
1451 }
1452
1453 [Test]
1454 public void UnsafeHashSet_NativeList_EIU_UnionWith_Empty()
1455 {
1456 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1457 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { };
1458 container.UnionWith(other);
1459
1460 ExpectedCount(ref container, 0);
1461
1462 container.Dispose();
1463 other.Dispose();
1464 }
1465
1466 [Test]
1467 public void UnsafeHashSet_NativeList_EIU_UnionWith()
1468 {
1469 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1470 var other = new NativeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1471 container.UnionWith(other);
1472
1473 ExpectedCount(ref container, 9);
1474 Assert.True(container.Contains(0));
1475 Assert.True(container.Contains(1));
1476 Assert.True(container.Contains(2));
1477 Assert.True(container.Contains(3));
1478 Assert.True(container.Contains(4));
1479 Assert.True(container.Contains(5));
1480 Assert.True(container.Contains(6));
1481 Assert.True(container.Contains(7));
1482 Assert.True(container.Contains(8));
1483
1484 container.Dispose();
1485 other.Dispose();
1486 }
1487
1488
1489 [Test]
1490 public void UnsafeHashSet_UnsafeList_EIU_ExceptWith_Empty()
1491 {
1492 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1493 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { };
1494 container.ExceptWith(other);
1495
1496 ExpectedCount(ref container, 0);
1497
1498 container.Dispose();
1499 other.Dispose();
1500 }
1501
1502 [Test]
1503 public void UnsafeHashSet_UnsafeList_EIU_ExceptWith_AxB()
1504 {
1505 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1506 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1507 container.ExceptWith(other);
1508
1509 ExpectedCount(ref container, 3);
1510 Assert.True(container.Contains(0));
1511 Assert.True(container.Contains(1));
1512 Assert.True(container.Contains(2));
1513
1514 container.Dispose();
1515 other.Dispose();
1516 }
1517
1518 [Test]
1519 public void UnsafeHashSet_UnsafeList_EIU_IntersectWith_Empty()
1520 {
1521 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1522 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { };
1523 container.IntersectWith(other);
1524
1525 ExpectedCount(ref container, 0);
1526
1527 container.Dispose();
1528 other.Dispose();
1529 }
1530
1531 [Test]
1532 public void UnsafeHashSet_UnsafeList_EIU_IntersectWith()
1533 {
1534 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1535 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1536 container.IntersectWith(other);
1537
1538 ExpectedCount(ref container, 3);
1539 Assert.True(container.Contains(3));
1540 Assert.True(container.Contains(4));
1541 Assert.True(container.Contains(5));
1542
1543 container.Dispose();
1544 other.Dispose();
1545 }
1546
1547 [Test]
1548 public void UnsafeHashSet_UnsafeList_EIU_UnionWith_Empty()
1549 {
1550 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1551 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { };
1552 container.UnionWith(other);
1553
1554 ExpectedCount(ref container, 0);
1555
1556 container.Dispose();
1557 other.Dispose();
1558 }
1559
1560 [Test]
1561 public void UnsafeHashSet_UnsafeList_EIU_UnionWith()
1562 {
1563 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1564 var other = new UnsafeList<int>(8, CommonRwdAllocator.Handle) { 3, 4, 5, 6, 7, 8 };
1565 container.UnionWith(other);
1566
1567 ExpectedCount(ref container, 9);
1568 Assert.True(container.Contains(0));
1569 Assert.True(container.Contains(1));
1570 Assert.True(container.Contains(2));
1571 Assert.True(container.Contains(3));
1572 Assert.True(container.Contains(4));
1573 Assert.True(container.Contains(5));
1574 Assert.True(container.Contains(6));
1575 Assert.True(container.Contains(7));
1576 Assert.True(container.Contains(8));
1577
1578 container.Dispose();
1579 other.Dispose();
1580 }
1581
1582
1583 [Test]
1584 public void UnsafeHashSet_FixedList32Bytes_EIU_ExceptWith_Empty()
1585 {
1586 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1587 var other = new FixedList32Bytes<int>() { };
1588 container.ExceptWith(other);
1589
1590 ExpectedCount(ref container, 0);
1591
1592 container.Dispose();
1593 }
1594
1595 [Test]
1596 public void UnsafeHashSet_FixedList32Bytes_EIU_ExceptWith_AxB()
1597 {
1598 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1599 var other = new FixedList32Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1600 container.ExceptWith(other);
1601
1602 ExpectedCount(ref container, 3);
1603 Assert.True(container.Contains(0));
1604 Assert.True(container.Contains(1));
1605 Assert.True(container.Contains(2));
1606
1607 container.Dispose();
1608 }
1609
1610 [Test]
1611 public void UnsafeHashSet_FixedList32Bytes_EIU_IntersectWith_Empty()
1612 {
1613 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1614 var other = new FixedList32Bytes<int>() { };
1615 container.IntersectWith(other);
1616
1617 ExpectedCount(ref container, 0);
1618
1619 container.Dispose();
1620 }
1621
1622 [Test]
1623 public void UnsafeHashSet_FixedList32Bytes_EIU_IntersectWith()
1624 {
1625 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1626 var other = new FixedList32Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1627 container.IntersectWith(other);
1628
1629 ExpectedCount(ref container, 3);
1630 Assert.True(container.Contains(3));
1631 Assert.True(container.Contains(4));
1632 Assert.True(container.Contains(5));
1633
1634 container.Dispose();
1635 }
1636
1637 [Test]
1638 public void UnsafeHashSet_FixedList32Bytes_EIU_UnionWith_Empty()
1639 {
1640 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1641 var other = new FixedList32Bytes<int>() { };
1642 container.UnionWith(other);
1643
1644 ExpectedCount(ref container, 0);
1645
1646 container.Dispose();
1647 }
1648
1649 [Test]
1650 public void UnsafeHashSet_FixedList32Bytes_EIU_UnionWith()
1651 {
1652 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1653 var other = new FixedList32Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1654 container.UnionWith(other);
1655
1656 ExpectedCount(ref container, 9);
1657 Assert.True(container.Contains(0));
1658 Assert.True(container.Contains(1));
1659 Assert.True(container.Contains(2));
1660 Assert.True(container.Contains(3));
1661 Assert.True(container.Contains(4));
1662 Assert.True(container.Contains(5));
1663 Assert.True(container.Contains(6));
1664 Assert.True(container.Contains(7));
1665 Assert.True(container.Contains(8));
1666
1667 container.Dispose();
1668 }
1669 [Test]
1670 public void UnsafeHashSet_FixedList64Bytes_EIU_ExceptWith_Empty()
1671 {
1672 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1673 var other = new FixedList64Bytes<int>() { };
1674 container.ExceptWith(other);
1675
1676 ExpectedCount(ref container, 0);
1677
1678 container.Dispose();
1679 }
1680
1681 [Test]
1682 public void UnsafeHashSet_FixedList64Bytes_EIU_ExceptWith_AxB()
1683 {
1684 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1685 var other = new FixedList64Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1686 container.ExceptWith(other);
1687
1688 ExpectedCount(ref container, 3);
1689 Assert.True(container.Contains(0));
1690 Assert.True(container.Contains(1));
1691 Assert.True(container.Contains(2));
1692
1693 container.Dispose();
1694 }
1695
1696 [Test]
1697 public void UnsafeHashSet_FixedList64Bytes_EIU_IntersectWith_Empty()
1698 {
1699 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1700 var other = new FixedList64Bytes<int>() { };
1701 container.IntersectWith(other);
1702
1703 ExpectedCount(ref container, 0);
1704
1705 container.Dispose();
1706 }
1707
1708 [Test]
1709 public void UnsafeHashSet_FixedList64Bytes_EIU_IntersectWith()
1710 {
1711 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1712 var other = new FixedList64Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1713 container.IntersectWith(other);
1714
1715 ExpectedCount(ref container, 3);
1716 Assert.True(container.Contains(3));
1717 Assert.True(container.Contains(4));
1718 Assert.True(container.Contains(5));
1719
1720 container.Dispose();
1721 }
1722
1723 [Test]
1724 public void UnsafeHashSet_FixedList64Bytes_EIU_UnionWith_Empty()
1725 {
1726 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1727 var other = new FixedList64Bytes<int>() { };
1728 container.UnionWith(other);
1729
1730 ExpectedCount(ref container, 0);
1731
1732 container.Dispose();
1733 }
1734
1735 [Test]
1736 public void UnsafeHashSet_FixedList64Bytes_EIU_UnionWith()
1737 {
1738 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1739 var other = new FixedList64Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1740 container.UnionWith(other);
1741
1742 ExpectedCount(ref container, 9);
1743 Assert.True(container.Contains(0));
1744 Assert.True(container.Contains(1));
1745 Assert.True(container.Contains(2));
1746 Assert.True(container.Contains(3));
1747 Assert.True(container.Contains(4));
1748 Assert.True(container.Contains(5));
1749 Assert.True(container.Contains(6));
1750 Assert.True(container.Contains(7));
1751 Assert.True(container.Contains(8));
1752
1753 container.Dispose();
1754 }
1755 [Test]
1756 public void UnsafeHashSet_FixedList128Bytes_EIU_ExceptWith_Empty()
1757 {
1758 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1759 var other = new FixedList128Bytes<int>() { };
1760 container.ExceptWith(other);
1761
1762 ExpectedCount(ref container, 0);
1763
1764 container.Dispose();
1765 }
1766
1767 [Test]
1768 public void UnsafeHashSet_FixedList128Bytes_EIU_ExceptWith_AxB()
1769 {
1770 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1771 var other = new FixedList128Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1772 container.ExceptWith(other);
1773
1774 ExpectedCount(ref container, 3);
1775 Assert.True(container.Contains(0));
1776 Assert.True(container.Contains(1));
1777 Assert.True(container.Contains(2));
1778
1779 container.Dispose();
1780 }
1781
1782 [Test]
1783 public void UnsafeHashSet_FixedList128Bytes_EIU_IntersectWith_Empty()
1784 {
1785 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1786 var other = new FixedList128Bytes<int>() { };
1787 container.IntersectWith(other);
1788
1789 ExpectedCount(ref container, 0);
1790
1791 container.Dispose();
1792 }
1793
1794 [Test]
1795 public void UnsafeHashSet_FixedList128Bytes_EIU_IntersectWith()
1796 {
1797 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1798 var other = new FixedList128Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1799 container.IntersectWith(other);
1800
1801 ExpectedCount(ref container, 3);
1802 Assert.True(container.Contains(3));
1803 Assert.True(container.Contains(4));
1804 Assert.True(container.Contains(5));
1805
1806 container.Dispose();
1807 }
1808
1809 [Test]
1810 public void UnsafeHashSet_FixedList128Bytes_EIU_UnionWith_Empty()
1811 {
1812 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1813 var other = new FixedList128Bytes<int>() { };
1814 container.UnionWith(other);
1815
1816 ExpectedCount(ref container, 0);
1817
1818 container.Dispose();
1819 }
1820
1821 [Test]
1822 public void UnsafeHashSet_FixedList128Bytes_EIU_UnionWith()
1823 {
1824 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1825 var other = new FixedList128Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1826 container.UnionWith(other);
1827
1828 ExpectedCount(ref container, 9);
1829 Assert.True(container.Contains(0));
1830 Assert.True(container.Contains(1));
1831 Assert.True(container.Contains(2));
1832 Assert.True(container.Contains(3));
1833 Assert.True(container.Contains(4));
1834 Assert.True(container.Contains(5));
1835 Assert.True(container.Contains(6));
1836 Assert.True(container.Contains(7));
1837 Assert.True(container.Contains(8));
1838
1839 container.Dispose();
1840 }
1841 [Test]
1842 public void UnsafeHashSet_FixedList512Bytes_EIU_ExceptWith_Empty()
1843 {
1844 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1845 var other = new FixedList512Bytes<int>() { };
1846 container.ExceptWith(other);
1847
1848 ExpectedCount(ref container, 0);
1849
1850 container.Dispose();
1851 }
1852
1853 [Test]
1854 public void UnsafeHashSet_FixedList512Bytes_EIU_ExceptWith_AxB()
1855 {
1856 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1857 var other = new FixedList512Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1858 container.ExceptWith(other);
1859
1860 ExpectedCount(ref container, 3);
1861 Assert.True(container.Contains(0));
1862 Assert.True(container.Contains(1));
1863 Assert.True(container.Contains(2));
1864
1865 container.Dispose();
1866 }
1867
1868 [Test]
1869 public void UnsafeHashSet_FixedList512Bytes_EIU_IntersectWith_Empty()
1870 {
1871 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1872 var other = new FixedList512Bytes<int>() { };
1873 container.IntersectWith(other);
1874
1875 ExpectedCount(ref container, 0);
1876
1877 container.Dispose();
1878 }
1879
1880 [Test]
1881 public void UnsafeHashSet_FixedList512Bytes_EIU_IntersectWith()
1882 {
1883 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1884 var other = new FixedList512Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1885 container.IntersectWith(other);
1886
1887 ExpectedCount(ref container, 3);
1888 Assert.True(container.Contains(3));
1889 Assert.True(container.Contains(4));
1890 Assert.True(container.Contains(5));
1891
1892 container.Dispose();
1893 }
1894
1895 [Test]
1896 public void UnsafeHashSet_FixedList512Bytes_EIU_UnionWith_Empty()
1897 {
1898 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1899 var other = new FixedList512Bytes<int>() { };
1900 container.UnionWith(other);
1901
1902 ExpectedCount(ref container, 0);
1903
1904 container.Dispose();
1905 }
1906
1907 [Test]
1908 public void UnsafeHashSet_FixedList512Bytes_EIU_UnionWith()
1909 {
1910 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1911 var other = new FixedList512Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1912 container.UnionWith(other);
1913
1914 ExpectedCount(ref container, 9);
1915 Assert.True(container.Contains(0));
1916 Assert.True(container.Contains(1));
1917 Assert.True(container.Contains(2));
1918 Assert.True(container.Contains(3));
1919 Assert.True(container.Contains(4));
1920 Assert.True(container.Contains(5));
1921 Assert.True(container.Contains(6));
1922 Assert.True(container.Contains(7));
1923 Assert.True(container.Contains(8));
1924
1925 container.Dispose();
1926 }
1927 [Test]
1928 public void UnsafeHashSet_FixedList4096Bytes_EIU_ExceptWith_Empty()
1929 {
1930 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1931 var other = new FixedList4096Bytes<int>() { };
1932 container.ExceptWith(other);
1933
1934 ExpectedCount(ref container, 0);
1935
1936 container.Dispose();
1937 }
1938
1939 [Test]
1940 public void UnsafeHashSet_FixedList4096Bytes_EIU_ExceptWith_AxB()
1941 {
1942 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1943 var other = new FixedList4096Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1944 container.ExceptWith(other);
1945
1946 ExpectedCount(ref container, 3);
1947 Assert.True(container.Contains(0));
1948 Assert.True(container.Contains(1));
1949 Assert.True(container.Contains(2));
1950
1951 container.Dispose();
1952 }
1953
1954 [Test]
1955 public void UnsafeHashSet_FixedList4096Bytes_EIU_IntersectWith_Empty()
1956 {
1957 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1958 var other = new FixedList4096Bytes<int>() { };
1959 container.IntersectWith(other);
1960
1961 ExpectedCount(ref container, 0);
1962
1963 container.Dispose();
1964 }
1965
1966 [Test]
1967 public void UnsafeHashSet_FixedList4096Bytes_EIU_IntersectWith()
1968 {
1969 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1970 var other = new FixedList4096Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1971 container.IntersectWith(other);
1972
1973 ExpectedCount(ref container, 3);
1974 Assert.True(container.Contains(3));
1975 Assert.True(container.Contains(4));
1976 Assert.True(container.Contains(5));
1977
1978 container.Dispose();
1979 }
1980
1981 [Test]
1982 public void UnsafeHashSet_FixedList4096Bytes_EIU_UnionWith_Empty()
1983 {
1984 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { };
1985 var other = new FixedList4096Bytes<int>() { };
1986 container.UnionWith(other);
1987
1988 ExpectedCount(ref container, 0);
1989
1990 container.Dispose();
1991 }
1992
1993 [Test]
1994 public void UnsafeHashSet_FixedList4096Bytes_EIU_UnionWith()
1995 {
1996 var container = new UnsafeHashSet<int>(8, CommonRwdAllocator.Handle) { 0, 1, 2, 3, 4, 5 };
1997 var other = new FixedList4096Bytes<int>() { 3, 4, 5, 6, 7, 8 };
1998 container.UnionWith(other);
1999
2000 ExpectedCount(ref container, 9);
2001 Assert.True(container.Contains(0));
2002 Assert.True(container.Contains(1));
2003 Assert.True(container.Contains(2));
2004 Assert.True(container.Contains(3));
2005 Assert.True(container.Contains(4));
2006 Assert.True(container.Contains(5));
2007 Assert.True(container.Contains(6));
2008 Assert.True(container.Contains(7));
2009 Assert.True(container.Contains(8));
2010
2011 container.Dispose();
2012 }
2013}