use of org.eclipse.xtext.formatting2.internal.ArrayListTextSegmentSet in project xtext-core by eclipse.
the class RegionSetTest method test.
private void test(final CharSequence expectation, final Procedure1<? super TestableTextSegmentSet> test) {
Function<ITextSegment, ITextSegment> _identity = Functions.<ITextSegment>identity();
Function<Object, String> _stringFunction = Functions.toStringFunction();
ArrayListTextSegmentSet<ITextSegment> _arrayListTextSegmentSet = new ArrayListTextSegmentSet<ITextSegment>(_identity, _stringFunction, true);
final TestableTextSegmentSet set = new TestableTextSegmentSet(_arrayListTextSegmentSet);
try {
test.apply(set);
} catch (final Throwable _t) {
if (_t instanceof Throwable) {
final Throwable t = (Throwable) _t;
t.printStackTrace();
Assert.fail();
} else {
throw Exceptions.sneakyThrow(_t);
}
}
Assert.assertEquals(expectation.toString(), set.toString());
}
Aggregations