Exemplo n.º 1
0
        // intersect()

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void intersect_shouldHandleNullInput()
        internal virtual void IntersectShouldHandleNullInput()
        {
            assertThat(PrimitiveArrays.Intersect(null, null), equalTo(_noLongs));
            assertThat(PrimitiveArrays.Intersect(null, _noLongs), equalTo(_noLongs));
            assertThat(PrimitiveArrays.Intersect(_noLongs, null), equalTo(_noLongs));
            assertThat(PrimitiveArrays.Intersect(null, _oneLong), equalTo(_noLongs));
            assertThat(PrimitiveArrays.Intersect(_oneLong, null), equalTo(_noLongs));
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void intersect_shouldHandleComplexIntersectingArraysWithGaps()
        internal virtual void IntersectShouldHandleComplexIntersectingArraysWithGaps()
        {
            assertThat(PrimitiveArrays.Intersect(new long[] { 4, 6, 9, 11, 12, 15 }, new long[] { 2, 3, 4, 7, 8, 9, 12, 16, 19 }), IsArray(4, 9, 12));
            assertThat(PrimitiveArrays.Intersect(new long[] { 2, 3, 4, 7, 8, 9, 12, 16, 19 }, new long[] { 4, 6, 9, 11, 12, 15 }), IsArray(4, 9, 12));
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void intersect_shouldHandleIntersectingArrays()
        internal virtual void IntersectShouldHandleIntersectingArrays()
        {
            assertThat(PrimitiveArrays.Intersect(new long[] { 1, 2, 3 }, new long[] { 3, 4, 5 }), IsArray(3));

            assertThat(PrimitiveArrays.Intersect(new long[] { 3, 4, 5 }, new long[] { 1, 2, 3, 4 }), IsArray(3, 4));
        }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void intersect_shouldHandleNonIntersectingArrays()
        internal virtual void IntersectShouldHandleNonIntersectingArrays()
        {
            assertThat(PrimitiveArrays.Intersect(new long[] { 1, 2, 3 }, new long[] { 4, 5, 6 }), equalTo(_noLongs));

            assertThat(PrimitiveArrays.Intersect(new long[] { 14, 15, 16 }, new long[] { 1, 2, 3 }), equalTo(_noLongs));
        }