mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
added new test for live postfix templates
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
public class Test {
|
||||
public static void main(String[] args) {
|
||||
Boolean.FALSE.<caret>
|
||||
}
|
||||
}
|
||||
+15
@@ -78,6 +78,21 @@ public class TemplatesCompletionTest extends CompletionAutoPopupTestCase {
|
||||
doCompleteTest(".2", '\n');
|
||||
}
|
||||
|
||||
public void testRestartCompletionForExactMatch() {
|
||||
configureByFile();
|
||||
type("not");
|
||||
LookupElement currentItem = getLookup().getCurrentItem();
|
||||
assertNotNull(currentItem);
|
||||
assertInstanceOf(currentItem, PostfixTemplateLookupElement.class);
|
||||
assertEquals(".not", currentItem.getLookupString());
|
||||
|
||||
type("null");
|
||||
currentItem = getLookup().getCurrentItem();
|
||||
assertNotNull(currentItem);
|
||||
assertInstanceOf(currentItem, PostfixTemplateLookupElement.class);
|
||||
assertEquals(".notnull", currentItem.getLookupString());
|
||||
}
|
||||
|
||||
public void testShowTemplateInAutoPopup() {
|
||||
doAutoPopupTest("instanceof", InstanceofExpressionPostfixTemplate.class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user