-
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
079d670
commit f55f9eb
Showing
32 changed files
with
136 additions
and
12 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
5 changes: 5 additions & 0 deletions
5
...r/expressions/comparison operator/bad-greater than or equal 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
.../expressions/comparison operator/bad-greater than or equal 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
...es/grammar/expressions/comparison operator/bad-greater than 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
...s/grammar/expressions/comparison operator/bad-greater than 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
...mmar/expressions/comparison operator/bad-less than or equal 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
...mar/expressions/comparison operator/bad-less than or equal 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
...urces/grammar/expressions/comparison operator/bad-less than 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
...rces/grammar/expressions/comparison operator/bad-less than 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
...ests/resources/grammar/expressions/comparison operator/good-greater than or equal.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
...langium/tests/resources/grammar/expressions/comparison operator/good-greater than.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
...m/tests/resources/grammar/expressions/comparison operator/good-less than or equal.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; | ||
} |
9 changes: 0 additions & 9 deletions
9
...ar/expressions/comparisonOperator.sdstest → ...less than vs. type parameter list.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,15 +1,6 @@ | ||
// $TEST$ no_syntax_error | ||
|
||
pipeline myPipeline { | ||
1 < 2; | ||
1 <= 2; | ||
1 == 2; | ||
1 === 2; | ||
1 != 2; | ||
1 !== 2; | ||
1 >= 2; | ||
1 > 2; | ||
|
||
// The start of a type argument list of a call could be confused with the less than operator | ||
1 < a<Int>(); | ||
} |
5 changes: 5 additions & 0 deletions
5
DSL-langium/tests/resources/grammar/expressions/comparison operator/good-less than.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
...s/resources/grammar/expressions/equality operator/bad-equal 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
.../resources/grammar/expressions/equality operator/bad-equal 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
...sources/grammar/expressions/equality operator/bad-identical 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
...ources/grammar/expressions/equality operator/bad-identical 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
...sources/grammar/expressions/equality operator/bad-not equal 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
...ources/grammar/expressions/equality operator/bad-not equal 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
...ces/grammar/expressions/equality operator/bad-not identical 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 { | ||
1 !==; | ||
} |
5 changes: 5 additions & 0 deletions
5
...es/grammar/expressions/equality operator/bad-not identical 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/equality operator/good-equal.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/equality operator/good-identical.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/equality operator/good-not equal.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/equality operator/good-not identical.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
DSL-langium/tests/resources/grammar/expressions/indexed access/bad-no receiver.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 { | ||
[1]; | ||
} |
2 changes: 1 addition & 1 deletion
2
...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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// $TEST$ syntax_error | ||
|
||
pipeline test { | ||
a[; | ||
a[1; | ||
} |
5 changes: 5 additions & 0 deletions
5
...s/resources/grammar/expressions/parenthesized expression/bad-unclosed parenthesis.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/parenthesized expression/good-nested.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.