void () { var file = myFixture.configureByText("a.txt", "aaabbbccc"); var f1 = psiFragment(file, 0, 3); var f2 = psiFragment(file, 3, 6).markUnknown(new TextRange(0, 3)); var f3 = psiFragment(file, 6, 9); var joined = TextContent.join(List.of(f1, f2, f3)); assertEquals("aaaccc", joined.toString()); assertFalse(joined.hasUnknownFragmentsIn(new TextRange(0, 2))); assertTrue(joined.hasUnknownFragmentsIn(new TextRange(0, 4))); assertTrue(joined.hasUnknownFragmentsIn(new TextRange(3, 5))); assertTrue(joined.hasUnknownFragmentsIn(new TextRange(3, 3))); assertEquals(3, joined.textOffsetToFile(3, false)); assertEquals(6, joined.textOffsetToFile(3, true)); }