public void TestHalfOpenRange() { FilterParamIndexDoubleRangeInverted index = MakeOne("LongBoxed", FilterOperator.NOT_RANGE_HALF_OPEN, testEventType); index.Put(new DoubleRange(2d, 4d), testEvaluators[0]); index.Put(new DoubleRange(2d, 5d), testEvaluators[1]); index.Put(new DoubleRange(1d, 3d), testEvaluators[2]); index.Put(new DoubleRange(1d, 1d), testEvaluators[3]); Verify(index, 0L, new bool[] { true, true, true, true }); Verify(index, 1L, new bool[] { true, true, false, true }); Verify(index, 2L, new bool[] { false, false, false, true }); Verify(index, 3L, new bool[] { false, false, true, true }); Verify(index, 4L, new bool[] { true, false, true, true }); Verify(index, 5L, new bool[] { true, true, true, true }); Verify(index, 6L, new bool[] { true, true, true, true }); }
public void TestClosedRange() { FilterParamIndexDoubleRangeInverted index = MakeOne("LongBoxed", FilterOperator.NOT_RANGE_CLOSED, testEventType); Assert.AreEqual(FilterOperator.NOT_RANGE_CLOSED, index.FilterOperator); index.Put(new DoubleRange(2d, 4d), testEvaluators[0]); index.Put(new DoubleRange(2d, 5d), testEvaluators[1]); index.Put(new DoubleRange(1d, 3d), testEvaluators[2]); index.Put(new DoubleRange(1d, 1d), testEvaluators[3]); Verify(index, 0L, new bool[] { true, true, true, true }); Verify(index, 1L, new bool[] { true, true, false, false }); Verify(index, 2L, new bool[] { false, false, false, true }); Verify(index, 3L, new bool[] { false, false, false, true }); Verify(index, 4L, new bool[] { false, false, true, true }); Verify(index, 5L, new bool[] { true, false, true, true }); Verify(index, 6L, new bool[] { true, true, true, true }); }