-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: additional grammar tests for expressions
- Loading branch information
1 parent
550fe77
commit 079d670
Showing
27 changed files
with
115 additions
and
11 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...ources/grammar/expressions/arithmetic operator/bad-addition without left operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
+ 2; | ||
} |
5 changes: 5 additions & 0 deletions
5
...urces/grammar/expressions/arithmetic operator/bad-addition without right operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
1 +; | ||
} |
5 changes: 5 additions & 0 deletions
5
...ources/grammar/expressions/arithmetic operator/bad-division without left operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
/ 2; | ||
} |
5 changes: 5 additions & 0 deletions
5
...urces/grammar/expressions/arithmetic operator/bad-division without right operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
1 /; | ||
} |
5 changes: 5 additions & 0 deletions
5
.../grammar/expressions/arithmetic operator/bad-multiplication without left operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
* 2; | ||
} |
5 changes: 5 additions & 0 deletions
5
...grammar/expressions/arithmetic operator/bad-multiplication without right operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
1 *; | ||
} |
5 changes: 5 additions & 0 deletions
5
...s/resources/grammar/expressions/arithmetic operator/bad-negation without operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
-; | ||
} |
5 changes: 5 additions & 0 deletions
5
...es/grammar/expressions/arithmetic operator/bad-subtraction without right operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
1 -; | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/arithmetic operator/good-addition.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
1 + 2; | ||
} |
6 changes: 0 additions & 6 deletions
6
...ar/expressions/arithmeticOperator.sdstest → ...tic operator/good-complex example.sdstest
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 |
---|---|---|
@@ -1,11 +1,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
1 + 2; | ||
1 - 2; | ||
1 * 2; | ||
1 / 2; | ||
-1; | ||
|
||
(1 + 2) * -3 / (1 - 4) + 5; | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/arithmetic operator/good-division.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
1 / 2; | ||
} |
5 changes: 5 additions & 0 deletions
5
...ngium/tests/resources/grammar/expressions/arithmetic operator/good-multiplication.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
1 * 2; | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/arithmetic operator/good-negation.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
-1; | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/arithmetic operator/good-subtraction.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
1 - 2; | ||
} |
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
...um/tests/resources/grammar/expressions/indexed access/bad-unclosed square bracket.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline test { | ||
a[; | ||
} |
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 |
---|---|---|
|
@@ -2,5 +2,4 @@ | |
|
||
pipeline test { | ||
a[1]; | ||
a[b]; | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/indexed access/good-reference index.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline test { | ||
a[b]; | ||
} |
5 changes: 5 additions & 0 deletions
5
...urces/grammar/expressions/logical operation/bad-conjunction without left operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
and true; | ||
} |
5 changes: 5 additions & 0 deletions
5
...rces/grammar/expressions/logical operation/bad-conjunction without right operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
false and; | ||
} |
5 changes: 5 additions & 0 deletions
5
...urces/grammar/expressions/logical operation/bad-disjunction without left operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
or true; | ||
} |
5 changes: 5 additions & 0 deletions
5
...rces/grammar/expressions/logical operation/bad-disjunction without right operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
true or; | ||
} |
5 changes: 5 additions & 0 deletions
5
...sts/resources/grammar/expressions/logical operation/bad-negation without operator.sdstest
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,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline myPipeline { | ||
-; | ||
} |
4 changes: 0 additions & 4 deletions
4
...ammar/expressions/logicalOperator.sdstest → ...al operation/good-complex example.sdstest
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 |
---|---|---|
@@ -1,9 +1,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
false and true; | ||
true or true; | ||
not true; | ||
|
||
not true and false or true; | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/logical operation/good-conjunction.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
false and true; | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/logical operation/good-disjunction.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
true or true; | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/logical operation/good-negation.sdstest
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,5 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
not true; | ||
} |