Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Huy-DNA committed Aug 2, 2023
1 parent 05504f1 commit c319a96
Show file tree
Hide file tree
Showing 13 changed files with 1,801 additions and 1,210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@
"value": [
{
"kind": "<eof>",
"offset": 150,
"offset": 151,
"length": 0,
"leadingTrivia": [
{
"kind": "<single-line-comment>",
"offset": 0,
"value": " This is a single-line comment\r",
"length": 33,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 33,
"value": "\n",
"length": 1,
"length": 34,
"leadingTrivia": [],
"trailingTrivia": []
},
Expand Down Expand Up @@ -57,103 +49,55 @@
"kind": "<single-line-comment>",
"offset": 84,
"value": " This is\r",
"length": 11,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 95,
"value": "\n",
"length": 1,
"length": 12,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<single-line-comment>",
"offset": 96,
"value": " a\r",
"length": 5,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 101,
"value": "\n",
"length": 1,
"length": 6,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<single-line-comment>",
"offset": 102,
"value": " bunch\r",
"length": 9,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 111,
"value": "\n",
"length": 1,
"length": 10,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<single-line-comment>",
"offset": 112,
"value": " of\r",
"length": 6,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 118,
"value": "\n",
"length": 1,
"length": 7,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<single-line-comment>",
"offset": 119,
"value": " single\r",
"length": 10,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 129,
"value": "\n",
"length": 1,
"length": 11,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<single-line-comment>",
"offset": 130,
"value": " line\r",
"length": 8,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 138,
"value": "\n",
"length": 1,
"length": 9,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<single-line-comment>",
"offset": 139,
"value": " comments",
"length": 11,
"length": 12,
"leadingTrivia": [],
"trailingTrivia": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
]
},
{
"kind": "<asterisk>",
"kind": "<OP>",
"offset": 28,
"value": "*",
"length": 1,
Expand Down Expand Up @@ -153,14 +153,14 @@
"errors": [
{
"code": 1002,
"diagnostic": "Unclosed function expression",
"diagnostic": "Invalid newline encountered while parsing",
"start": 18,
"end": 20,
"name": "ParsingError"
},
{
"code": 1002,
"diagnostic": "Unclosed function expression",
"diagnostic": "Eof reached while parsing",
"start": 33,
"end": 34,
"name": "ParsingError"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
},
{
"kind": "<eof>",
"offset": 67,
"offset": 68,
"length": 0,
"leadingTrivia": [
{
Expand All @@ -127,7 +127,7 @@
"kind": "<single-line-comment>",
"offset": 46,
"value": " invalid identifier",
"length": 21,
"length": 22,
"leadingTrivia": [],
"trailingTrivia": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,7 @@
"kind": "<single-line-comment>",
"offset": 4,
"value": " whole number\r",
"length": 16,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 20,
"value": "\n",
"length": 1,
"length": 17,
"leadingTrivia": [],
"trailingTrivia": []
}
Expand Down Expand Up @@ -86,13 +78,13 @@
"kind": "<single-line-comment>",
"offset": 30,
"value": " floating-point number\r",
"length": 25,
"length": 26,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<newline>",
"offset": 55,
"offset": 57,
"value": "\n",
"length": 1,
"leadingTrivia": [],
Expand All @@ -102,17 +94,9 @@
},
{
"kind": "<eof>",
"offset": 97,
"offset": 98,
"length": 0,
"leadingTrivia": [
{
"kind": "<newline>",
"offset": 57,
"value": "\n",
"length": 1,
"leadingTrivia": [],
"trailingTrivia": []
},
{
"kind": "<space>",
"offset": 62,
Expand Down Expand Up @@ -141,7 +125,7 @@
"kind": "<single-line-comment>",
"offset": 80,
"value": " invalid number",
"length": 17,
"length": 18,
"leadingTrivia": [],
"trailingTrivia": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
},
{
"kind": "<variable>",
"offset": 70,
"offset": 29,
"value": "This is a quoted string \nwith a newline\n",
"length": 3,
"length": 42,
"leadingTrivia": [
{
"kind": "<newline>",
Expand Down Expand Up @@ -71,9 +71,9 @@
},
{
"kind": "<string>",
"offset": 149,
"offset": 107,
"value": "This is a string literal \nwith a newline\n",
"length": 3,
"length": 43,
"leadingTrivia": [
{
"kind": "<newline>",
Expand Down Expand Up @@ -173,21 +173,21 @@
"errors": [
{
"code": 1002,
"diagnostic": "Unclosed quoted variable",
"diagnostic": "Invalid newline encountered while parsing",
"start": 156,
"end": 191,
"name": "ParsingError"
},
{
"code": 1002,
"diagnostic": "Unclosed single-line string literal",
"diagnostic": "Invalid newline encountered while parsing",
"start": 194,
"end": 230,
"name": "ParsingError"
},
{
"code": 1002,
"diagnostic": "Unclosed multiline string literal",
"diagnostic": "Eof reached while parsing",
"start": 271,
"end": 312,
"name": "ParsingError"
Expand Down
Loading

0 comments on commit c319a96

Please sign in to comment.