-
Notifications
You must be signed in to change notification settings - Fork 61
Fix various small issues found when I imported all recent error tests #410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
4 changes: 3 additions & 1 deletion
4
sjsonnet/test/resources/test_suite/error.decodeUTF8_float.jsonnet.golden
This file contains hidden or 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 +1,3 @@ | ||
"\u0011" | ||
sjsonnet.Error: Element 0 of the provided array was not an integer in range [0,255] | ||
at [std.decodeUTF8].(sjsonnet/test/resources/test_suite/error.decodeUTF8_float.jsonnet:1:15) | ||
|
2 changes: 1 addition & 1 deletion
2
sjsonnet/test/resources/test_suite/error.decodeUTF8_nan.jsonnet.golden
This file contains hidden or 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,3 +1,3 @@ | ||
sjsonnet.Error: Expected number, found string | ||
sjsonnet.Error: Element 0 of the provided array was not an integer in range [0,255] | ||
at [std.decodeUTF8].(sjsonnet/test/resources/test_suite/error.decodeUTF8_nan.jsonnet:1:15) | ||
|
4 changes: 3 additions & 1 deletion
4
sjsonnet/test/resources/test_suite/error.negative_shfit.jsonnet.golden
This file contains hidden or 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 +1,3 @@ | ||
0 | ||
sjsonnet.Error: shift by negative exponent | ||
at [BinaryOp >>].(error.negative_shfit.jsonnet:1:8) | ||
|
4 changes: 3 additions & 1 deletion
4
sjsonnet/test/resources/test_suite/error.overflow.jsonnet.golden
This file contains hidden or 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 +1,3 @@ | ||
Infinity | ||
sjsonnet.Error: overflow | ||
at [BinaryOp *].(error.overflow2.jsonnet:17:7) | ||
|
4 changes: 3 additions & 1 deletion
4
sjsonnet/test/resources/test_suite/error.overflow2.jsonnet.golden
This file contains hidden or 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 +1,3 @@ | ||
Infinity | ||
sjsonnet.Error: overflow | ||
at [BinaryOp *].(error.overflow2.jsonnet:17:7) | ||
|
38 changes: 3 additions & 35 deletions
38
sjsonnet/test/resources/test_suite/error.parse.string.invalid_escape.jsonnet.golden
This file contains hidden or 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,35 +1,3 @@ | ||
Exception in thread "main" scala.MatchError: o (of class java.lang.String) | ||
at sjsonnet.Parser.escape0(Parser.scala:109) | ||
at sjsonnet.Parser.escape(Parser.scala:99) | ||
at sjsonnet.Parser.rec$2(Parser.scala:115) | ||
at sjsonnet.Parser.doubleString(Parser.scala:115) | ||
at sjsonnet.Parser.expr2(Parser.scala:349) | ||
at sjsonnet.Parser.expr1(Parser.scala:275) | ||
at sjsonnet.Parser.expr(Parser.scala:211) | ||
at sjsonnet.Parser.document(Parser.scala:567) | ||
at sjsonnet.CachedResolver.$anonfun$2(Importer.scala:218) | ||
at fastparse.SharedPackageDefs.parseInputRaw(SharedPackageDefs.scala:69) | ||
at fastparse.SharedPackageDefs.parseInputRaw$(SharedPackageDefs.scala:6) | ||
at fastparse.package$.parseInputRaw(package.scala:5) | ||
at fastparse.SharedPackageDefs.parse$$anonfun$1(SharedPackageDefs.scala:35) | ||
at fastparse.ParserInputSource$fromParserInput.parseThrough(ParserInput.scala:25) | ||
at fastparse.SharedPackageDefs.parse(SharedPackageDefs.scala:42) | ||
at fastparse.SharedPackageDefs.parse$(SharedPackageDefs.scala:6) | ||
at fastparse.package$.parse(package.scala:5) | ||
at sjsonnet.CachedResolver.parse$$anonfun$1(Importer.scala:216) | ||
at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:469) | ||
at sjsonnet.DefaultParseCache.getOrElseUpdate(ParseCache.scala:21) | ||
at sjsonnet.CachedResolver.parse(Importer.scala:227) | ||
at sjsonnet.Interpreter.evaluate(Interpreter.scala:175) | ||
at sjsonnet.Interpreter.interpret0(Interpreter.scala:158) | ||
at sjsonnet.SjsonnetMain$.renderNormal$$anonfun$1(SjsonnetMain.scala:157) | ||
at sjsonnet.SjsonnetMain$.writeToFile(SjsonnetMain.scala:131) | ||
at sjsonnet.SjsonnetMain$.renderNormal(SjsonnetMain.scala:155) | ||
at sjsonnet.SjsonnetMain$.mainConfigured(SjsonnetMain.scala:332) | ||
at sjsonnet.SjsonnetMain$.$anonfun$30$$anonfun$1(SjsonnetMain.scala:85) | ||
at scala.util.Either.flatMap(Either.scala:360) | ||
at sjsonnet.SjsonnetMain$.$anonfun$30(SjsonnetMain.scala:84) | ||
at scala.util.Either.flatMap(Either.scala:360) | ||
at sjsonnet.SjsonnetMain$.main0(SjsonnetMain.scala:77) | ||
at sjsonnet.SjsonnetMain$.main(SjsonnetMain.scala:44) | ||
at sjsonnet.SjsonnetMain.main(SjsonnetMain.scala) | ||
sjsonnet.ParseError: Expected "\"":17:2, found "\\o\"\n" | ||
at .(error.parse.string.invalid_escape.jsonnet:17:2) | ||
|
31 changes: 2 additions & 29 deletions
31
sjsonnet/test/resources/test_suite/error.parse_json.jsonnet.golden
This file contains hidden or 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,30 +1,3 @@ | ||
sjsonnet.Error: Internal Error | ||
at [std.parseJson].(sjsonnet/test/resources/test_suite/error.parse_json.jsonnet:1:14) | ||
Caused by: ujson.ParseException: expected json value got "b" at index 0 | ||
at ujson.ParseException$.apply(Exceptions.scala:6) | ||
at ujson.CharParser.die(CharParser.scala:98) | ||
at ujson.CharParser.parseTopLevel0(CharParser.scala:353) | ||
at ujson.CharParser.parseTopLevel(CharParser.scala:323) | ||
at ujson.CharParser.parse(CharParser.scala:72) | ||
at ujson.StringParser$.transform(StringParser.scala:28) | ||
at sjsonnet.Std$ParseJson$.evalRhs(Std.scala:989) | ||
at sjsonnet.Evaluator.visitApplyBuiltin1(Evaluator.scala:270) | ||
at sjsonnet.Evaluator.visitExpr(Evaluator.scala:40) | ||
at sjsonnet.Interpreter.evaluate$$anonfun$2$$anonfun$1(Interpreter.scala:177) | ||
at sjsonnet.Interpreter.sjsonnet$Interpreter$$handleException(Interpreter.scala:163) | ||
at sjsonnet.Interpreter.evaluate$$anonfun$2(Interpreter.scala:177) | ||
at scala.util.Either.flatMap(Either.scala:360) | ||
at sjsonnet.Interpreter.evaluate(Interpreter.scala:175) | ||
at sjsonnet.Interpreter.interpret0(Interpreter.scala:158) | ||
at sjsonnet.SjsonnetMain$.renderNormal$$anonfun$1(SjsonnetMain.scala:157) | ||
at sjsonnet.SjsonnetMain$.writeToFile(SjsonnetMain.scala:131) | ||
at sjsonnet.SjsonnetMain$.renderNormal(SjsonnetMain.scala:155) | ||
at sjsonnet.SjsonnetMain$.mainConfigured(SjsonnetMain.scala:332) | ||
at sjsonnet.SjsonnetMain$.$anonfun$30$$anonfun$1(SjsonnetMain.scala:85) | ||
at scala.util.Either.flatMap(Either.scala:360) | ||
at sjsonnet.SjsonnetMain$.$anonfun$30(SjsonnetMain.scala:84) | ||
at scala.util.Either.flatMap(Either.scala:360) | ||
at sjsonnet.SjsonnetMain$.main0(SjsonnetMain.scala:77) | ||
at sjsonnet.SjsonnetMain$.main(SjsonnetMain.scala:44) | ||
at sjsonnet.SjsonnetMain.main(SjsonnetMain.scala) | ||
sjsonnet.Error: Invalid JSON: expected json value got "b" at index 0 | ||
at [std.parseJson].(error.parse_json.jsonnet:1:14) | ||
|
25 changes: 1 addition & 24 deletions
25
sjsonnet/test/resources/test_suite/error.std_makeArray_negative.jsonnet.golden
This file contains hidden or 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,26 +1,3 @@ | ||
sjsonnet.Error: Internal Error | ||
sjsonnet.Error: std.makeArray requires size >= 0, got -10 | ||
at [std.makeArray].(sjsonnet/test/resources/test_suite/error.std_makeArray_negative.jsonnet:17:14) | ||
Caused by: java.lang.NegativeArraySizeException: -10 | ||
at sjsonnet.Std.$init$$$anonfun$13(Std.scala:1262) | ||
at sjsonnet.Std.$init$$$anonfun$adapted$7(Std.scala:1259) | ||
at sjsonnet.functions.FunctionBuilder$$anon$3.evalRhs(FunctionBuilder.scala:47) | ||
at sjsonnet.Evaluator.visitApplyBuiltin2(Evaluator.scala:278) | ||
at sjsonnet.Evaluator.visitExpr(Evaluator.scala:41) | ||
at sjsonnet.Interpreter.evaluate$$anonfun$2$$anonfun$1(Interpreter.scala:177) | ||
at sjsonnet.Interpreter.sjsonnet$Interpreter$$handleException(Interpreter.scala:163) | ||
at sjsonnet.Interpreter.evaluate$$anonfun$2(Interpreter.scala:177) | ||
at scala.util.Either.flatMap(Either.scala:360) | ||
at sjsonnet.Interpreter.evaluate(Interpreter.scala:175) | ||
at sjsonnet.Interpreter.interpret0(Interpreter.scala:158) | ||
at sjsonnet.SjsonnetMain$.renderNormal$$anonfun$1(SjsonnetMain.scala:157) | ||
at sjsonnet.SjsonnetMain$.writeToFile(SjsonnetMain.scala:131) | ||
at sjsonnet.SjsonnetMain$.renderNormal(SjsonnetMain.scala:155) | ||
at sjsonnet.SjsonnetMain$.mainConfigured(SjsonnetMain.scala:332) | ||
at sjsonnet.SjsonnetMain$.$anonfun$30$$anonfun$1(SjsonnetMain.scala:85) | ||
at scala.util.Either.flatMap(Either.scala:360) | ||
at sjsonnet.SjsonnetMain$.$anonfun$30(SjsonnetMain.scala:84) | ||
at scala.util.Either.flatMap(Either.scala:360) | ||
at sjsonnet.SjsonnetMain$.main0(SjsonnetMain.scala:77) | ||
at sjsonnet.SjsonnetMain$.main(SjsonnetMain.scala:44) | ||
at sjsonnet.SjsonnetMain.main(SjsonnetMain.scala) | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's better to prints what it is