-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Verify range-constraint and lenght-constraint work with only o…
…ne bound (#548) * test(constraints): add tests * fix(constraints): add language server hint for boundless constraint * test(constraints): add tests for language server hint closes #533
- Loading branch information
1 parent
2326441
commit 5e89f86
Showing
10 changed files
with
210 additions
and
0 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
28 changes: 28 additions & 0 deletions
28
libs/execution/test/assets/length-constraint-executor/only-lower-bound.jv
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,28 @@ | ||
// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
constraint TestConstraint oftype LengthConstraint { | ||
minLength: 2; | ||
} | ||
|
||
valuetype TestValueType oftype text { | ||
constraints: [ | ||
TestConstraint, | ||
]; | ||
} | ||
|
||
pipeline TestPipeline { | ||
|
||
block TestExtractor oftype TestFileExtractor { | ||
} | ||
|
||
block TestLoader oftype TestTableLoader { | ||
} | ||
|
||
block TestProperty oftype TestProperty { | ||
valuetypeAssignmentProperty: "test" oftype TestValueType; | ||
} | ||
|
||
TestExtractor -> TestProperty -> TestLoader; | ||
} |
28 changes: 28 additions & 0 deletions
28
libs/execution/test/assets/length-constraint-executor/only-upper-bound.jv
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,28 @@ | ||
// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
constraint TestConstraint oftype LengthConstraint { | ||
maxLength: 3; | ||
} | ||
|
||
valuetype TestValueType oftype text { | ||
constraints: [ | ||
TestConstraint, | ||
]; | ||
} | ||
|
||
pipeline TestPipeline { | ||
|
||
block TestExtractor oftype TestFileExtractor { | ||
} | ||
|
||
block TestLoader oftype TestTableLoader { | ||
} | ||
|
||
block TestProperty oftype TestProperty { | ||
valuetypeAssignmentProperty: "test" oftype TestValueType; | ||
} | ||
|
||
TestExtractor -> TestProperty -> TestLoader; | ||
} |
28 changes: 28 additions & 0 deletions
28
libs/execution/test/assets/range-constraint-executor/only-lower-bound.jv
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,28 @@ | ||
// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
constraint TestConstraint oftype RangeConstraint { | ||
lowerBound: 1; | ||
} | ||
|
||
valuetype TestValueType oftype integer { | ||
constraints: [ | ||
TestConstraint, | ||
]; | ||
} | ||
|
||
pipeline TestPipeline { | ||
|
||
block TestExtractor oftype TestFileExtractor { | ||
} | ||
|
||
block TestLoader oftype TestTableLoader { | ||
} | ||
|
||
block TestProperty oftype TestProperty { | ||
valuetypeAssignmentProperty: "test" oftype TestValueType; | ||
} | ||
|
||
TestExtractor -> TestProperty -> TestLoader; | ||
} |
28 changes: 28 additions & 0 deletions
28
libs/execution/test/assets/range-constraint-executor/only-upper-bound.jv
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,28 @@ | ||
// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
constraint TestConstraint oftype RangeConstraint { | ||
upperBound: 10; | ||
} | ||
|
||
valuetype TestValueType oftype integer { | ||
constraints: [ | ||
TestConstraint, | ||
]; | ||
} | ||
|
||
pipeline TestPipeline { | ||
|
||
block TestExtractor oftype TestFileExtractor { | ||
} | ||
|
||
block TestLoader oftype TestTableLoader { | ||
} | ||
|
||
block TestProperty oftype TestProperty { | ||
valuetypeAssignmentProperty: "test" oftype TestValueType; | ||
} | ||
|
||
TestExtractor -> TestProperty -> TestLoader; | ||
} |
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
6 changes: 6 additions & 0 deletions
6
...erver/src/test/assets/property-body/constrainttype-specific/length-constraint/no-bound.jv
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,6 @@ | ||
// SPDX-FileCopyrightText: 2023 Friedrich-Alexander-Universitat Erlangen-Nurnberg | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
constraint Test oftype LengthConstraint { | ||
} |
6 changes: 6 additions & 0 deletions
6
...server/src/test/assets/property-body/constrainttype-specific/range-constraint/no-bound.jv
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,6 @@ | ||
// SPDX-FileCopyrightText: 2023 Friedrich-Alexander-Universitat Erlangen-Nurnberg | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
constraint Test oftype RangeConstraint { | ||
} |