void () { LongRangeSet set = modRange(0, 24, 10, 0b111100); assertEquals("{2}", set.meet(range(0, 2)).toString()); assertEquals("{}", set.meet(range(0, 1)).toString()); assertEquals("{24}", set.meet(range(24, 27)).toString()); assertEquals("{}", set.meet(range(25, 27)).toString()); assertEquals("{12}", set.meet(range(10, 12)).toString()); assertEquals("{12, 13}", set.meet(range(10, 13)).toString()); assertEquals("{12..15}", set.meet(range(6, 15)).toString()); assertEquals("{}", set.meet(range(6, 9)).toString()); assertEquals("{5..15}: <2, 3, 4, 5> mod 10", set.meet(range(5, 15)).toString()); assertEquals("{13}", set.meet(modRange(10, 13, 10, 0b1000)).toString()); assertEquals("{12, 13}", set.meet(modRange(10, 13, 10, 0b1100)).toString()); assertEquals("{2..23}: <2, 3> mod 10", set.meet(modRange(-20, 100, 10, 0b1111)).toString()); assertEquals("{}", set.meet(modRange(0, 24, 10, 0b1111000011)).toString()); assertEquals("{5..15}: <5> mod 10", set.meet(modRange(0, 24, 5, 0b1)).toString()); assertEquals("{3..24}: <3, 4, 12, 13, 15, 22, 24, 25> mod 30", set.meet(modRange(0, 24, 3, 0b11)).toString()); assertEquals("{3..15}: <0, 3, 4, 12, 13> mod 15", set.meet(modRange(0, 16, 3, 0b11)).toString()); assertEquals("{1..99}: odd", range(0, 100).without(10).meet(modRange(-200, 200, 2, 0b10)).toString()); LongRangeSet even = modRange(0, 15, 2, 0b1); even = even.meet(point(10).fromRelation(RelationType.NE)); assertEquals("{0..14}: <0, 2, 4, 6, 8, 12, 14> mod 16", even.toString()); even = even.meet(point(9).fromRelation(RelationType.NE)); assertEquals("{0..14}: <0, 2, 4, 6, 8, 12, 14> mod 16", even.toString()); even = even.meet(point(2).fromRelation(RelationType.NE)); assertEquals("{0..14}: <0, 4, 6> mod 8", even.toString()); even = even.meet(point(4).fromRelation(RelationType.NE)); assertEquals("{0..14}: <0, 6, 8, 12, 14> mod 16", even.toString()); even = even.meet(point(6).fromRelation(RelationType.NE)); assertEquals("{0..14}: <0, 8, 12, 14> mod 16", even.toString()); }