-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow numbers to be written in queries in scientific (exponential) no…
…tation (#52)
- Loading branch information
1 parent
77338b7
commit da8c8cf
Showing
4 changed files
with
68 additions
and
2 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
15 changes: 15 additions & 0 deletions
15
...albertoventurini/graphdbplugin/test/integration/neo4j/tests/cypher/parsing/LexerTest.java
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,15 @@ | ||
package com.albertoventurini.graphdbplugin.test.integration.neo4j.tests.cypher.parsing; | ||
|
||
import com.albertoventurini.graphdbplugin.test.integration.neo4j.tests.cypher.util.BaseParsingTest; | ||
|
||
public class LexerTest extends BaseParsingTest { | ||
|
||
public LexerTest() { | ||
super("lexer"); | ||
} | ||
|
||
public void testScientificNotation() { | ||
doTest(true); | ||
} | ||
|
||
} |
2 changes: 2 additions & 0 deletions
2
testing/integration-neo4j/src/test/resources/parsing/lexer/ScientificNotation.cyp
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,2 @@ | ||
RETURN 1e6; | ||
RETURN 1.7976931348623157e+308; |
41 changes: 41 additions & 0 deletions
41
testing/integration-neo4j/src/test/resources/parsing/lexer/ScientificNotation.txt
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,41 @@ | ||
Cypher file: FILE(0,43) | ||
CypherStatementItemImpl(STATEMENT_ITEM)(0,11) | ||
CypherStatementImpl(STATEMENT)(0,10) | ||
CypherQueryOptionsImpl(QUERY_OPTIONS)(0,0) | ||
<empty list> | ||
CypherQueryImpl(QUERY)(0,10) | ||
CypherRegularQueryImpl(REGULAR_QUERY)(0,10) | ||
CypherSingleQueryImpl(SINGLE_QUERY)(0,10) | ||
CypherSinglePartQueryImpl(SINGLE_PART_QUERY)(0,10) | ||
CypherReadingWithReturnImpl(READING_WITH_RETURN)(0,10) | ||
CypherReturnImpl(RETURN)(0,10) | ||
PsiElement(RETURN)('RETURN')(0,6) | ||
CypherReturnBodyImpl(RETURN_BODY)(7,10) | ||
CypherReturnItemsImpl(RETURN_ITEMS)(7,10) | ||
CypherReturnItemImpl(RETURN_ITEM)(7,10) | ||
CypherExpressionImpl(EXPRESSION)(7,10) | ||
CypherNumberLiteralImpl(NUMBER_LITERAL)(7,10) | ||
CypherDoubleLiteralImpl(DOUBLE_LITERAL)(7,10) | ||
CypherUnsignedDoubleImpl(UNSIGNED_DOUBLE)(7,10) | ||
PsiElement(decimal)('1e6')(7,10) | ||
PsiElement(;)(';')(10,11) | ||
CypherStatementItemImpl(STATEMENT_ITEM)(12,43) | ||
CypherStatementImpl(STATEMENT)(12,42) | ||
CypherQueryOptionsImpl(QUERY_OPTIONS)(12,12) | ||
<empty list> | ||
CypherQueryImpl(QUERY)(12,42) | ||
CypherRegularQueryImpl(REGULAR_QUERY)(12,42) | ||
CypherSingleQueryImpl(SINGLE_QUERY)(12,42) | ||
CypherSinglePartQueryImpl(SINGLE_PART_QUERY)(12,42) | ||
CypherReadingWithReturnImpl(READING_WITH_RETURN)(12,42) | ||
CypherReturnImpl(RETURN)(12,42) | ||
PsiElement(RETURN)('RETURN')(12,18) | ||
CypherReturnBodyImpl(RETURN_BODY)(19,42) | ||
CypherReturnItemsImpl(RETURN_ITEMS)(19,42) | ||
CypherReturnItemImpl(RETURN_ITEM)(19,42) | ||
CypherExpressionImpl(EXPRESSION)(19,42) | ||
CypherNumberLiteralImpl(NUMBER_LITERAL)(19,42) | ||
CypherDoubleLiteralImpl(DOUBLE_LITERAL)(19,42) | ||
CypherUnsignedDoubleImpl(UNSIGNED_DOUBLE)(19,42) | ||
PsiElement(decimal)('1.7976931348623157e+308')(19,42) | ||
PsiElement(;)(';')(42,43) |