-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add validation for 'zoom' expression usage
- Loading branch information
Anand Thakker
committed
Jun 22, 2017
1 parent
3d2a76d
commit dd09152
Showing
3 changed files
with
62 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
{ | ||
"expression": [ | ||
"zoom" | ||
"curve", | ||
[ | ||
"linear" | ||
], | ||
[ | ||
"zoom" | ||
], | ||
0, | ||
0, | ||
30, | ||
30 | ||
], | ||
"evaluate": [ | ||
[ | ||
|
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,34 @@ | ||
{ | ||
"expression": [ | ||
"curve", | ||
[ | ||
"step" | ||
], | ||
1, | ||
0, | ||
[ | ||
"curve", | ||
[ | ||
"linear" | ||
], | ||
[ | ||
"zoom" | ||
], | ||
0, | ||
0, | ||
22, | ||
22 | ||
] | ||
], | ||
"expected": { | ||
"compileResult": { | ||
"result": "error", | ||
"errors": [ | ||
{ | ||
"key": "4.2", | ||
"error": "The \"zoom\" expression may only be used as the input to a top-level \"curve\" expression." | ||
} | ||
] | ||
} | ||
} | ||
} |