fix stackoverflow in Int/LongList.intersectionUnsorted
This commit is contained in:
@@ -1565,6 +1565,14 @@ public class IntListTest {
|
||||
final IntList actual = IntList.intersection(a, b);
|
||||
Assertions.assertEquals(IntList.of(4), actual);
|
||||
}
|
||||
|
||||
{
|
||||
final IntList a = IntList.of(1, 4, 3, 2, 4);
|
||||
final IntList b = IntList.of(4, 3, 4, 4, 2);
|
||||
final IntList actual = IntList.intersection(a, b);
|
||||
actual.sort();
|
||||
Assertions.assertEquals(IntList.of(2, 3, 4), actual);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1555,6 +1555,14 @@ public class LongListTest {
|
||||
final LongList actual = LongList.intersection(a, b);
|
||||
Assertions.assertEquals(LongList.of(4), actual);
|
||||
}
|
||||
|
||||
{
|
||||
final LongList a = LongList.of(1, 4, 3, 2, 4);
|
||||
final LongList b = LongList.of(4, 3, 4, 4, 2);
|
||||
final LongList actual = LongList.intersection(a, b);
|
||||
actual.sort();
|
||||
Assertions.assertEquals(LongList.of(2, 3, 4), actual);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user