Skip to content

Commit

Permalink
Add basic @debug syntax tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarlt committed Mar 13, 2024
1 parent 60f52da commit 453e544
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/libyul/yulSyntaxTests/invalid/invalid_debug_merge.yul
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
object "object" {
code {
/// @debug.merge {"HELLO": 2
}
}
// ----
// SyntaxError 5721: (37-65): @debug.merge: Could not parse debug data: parse error at line 1, column 12: syntax error while parsing object - unexpected end of input; expected '}'
7 changes: 7 additions & 0 deletions test/libyul/yulSyntaxTests/invalid/invalid_debug_patch.yul
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
object "object" {
code {
/// @debug.patch {"HELLO": invalid
}
}
// ----
// SyntaxError 5721: (37-71): @debug.patch: Could not parse debug data: parse error at line 1, column 11: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
object "object" {
code {
/// @debug.patch { "op": "unknown_operation", "path": "/variable_a", "value": ["test"] }
}
}
// ----
// SyntaxError 9426: (37-125): @debug.patch: Could not patch debug data: parse error: operation value 'unknown_operation' is invalid
7 changes: 7 additions & 0 deletions test/libyul/yulSyntaxTests/invalid/invalid_debug_set.yul
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
object "object" {
code {
/// @debug.set {"HELLO": "WORLD
}
}
// ----
// SyntaxError 5721: (37-68): @debug.set: Could not parse debug data: parse error at line 1, column 17: syntax error while parsing value - invalid string: missing closing quote; last read: '"WORLD'

0 comments on commit 453e544

Please sign in to comment.