-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#153 - Structure panel for let fn and let (..)
- Loading branch information
Showing
8 changed files
with
98 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.reason.lang.core; | ||
|
||
import com.reason.lang.BaseParsingTestCase; | ||
import com.reason.lang.core.psi.PsiLet; | ||
import com.reason.lang.core.psi.PsiScopedExpr; | ||
import com.reason.lang.ocaml.OclParserDefinition; | ||
|
||
@SuppressWarnings("ConstantConditions") | ||
public class PsiScopedExprTest extends BaseParsingTestCase { | ||
public PsiScopedExprTest() { | ||
super("", "ml", new OclParserDefinition()); | ||
} | ||
|
||
public void testEmptyScope() { | ||
PsiLet e = (PsiLet) firstElement(parseCode("let () = x1")); | ||
|
||
assertTrue(ORUtil.findImmediateFirstChildOfClass(e, PsiScopedExpr.class).isEmpty()); | ||
} | ||
|
||
public void testNotEmptyScope() { | ||
PsiLet e = (PsiLet) firstElement(parseCode("let (a, b) = x")); | ||
|
||
assertFalse(ORUtil.findImmediateFirstChildOfClass(e, PsiScopedExpr.class).isEmpty()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters