Improve snapshot testing (#5856)
* Improve snapshot testing Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -5,11 +5,7 @@ description: Artifact commands comparisons_multiple.kcl
|
||||
[
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "edge_lines_visible",
|
||||
"hidden": false
|
||||
@ -17,11 +13,7 @@ description: Artifact commands comparisons_multiple.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_scene_units",
|
||||
"unit": "mm"
|
||||
@ -29,11 +21,7 @@ description: Artifact commands comparisons_multiple.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
@ -42,11 +30,7 @@ description: Artifact commands comparisons_multiple.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of parsing comparisons_multiple.kcl
|
||||
---
|
||||
{
|
||||
"Ok": {
|
||||
"body": [
|
||||
{
|
||||
"end": 46,
|
||||
"end": 0,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"end": 18,
|
||||
"end": 0,
|
||||
"left": {
|
||||
"end": 13,
|
||||
"end": 0,
|
||||
"left": {
|
||||
"end": 8,
|
||||
"end": 0,
|
||||
"raw": "3",
|
||||
"start": 7,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -26,9 +26,9 @@ description: Result of parsing comparisons_multiple.kcl
|
||||
},
|
||||
"operator": "==",
|
||||
"right": {
|
||||
"end": 13,
|
||||
"end": 0,
|
||||
"raw": "3",
|
||||
"start": 12,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -36,15 +36,15 @@ description: Result of parsing comparisons_multiple.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"start": 7,
|
||||
"start": 0,
|
||||
"type": "BinaryExpression",
|
||||
"type": "BinaryExpression"
|
||||
},
|
||||
"operator": "==",
|
||||
"right": {
|
||||
"end": 18,
|
||||
"end": 0,
|
||||
"raw": "3",
|
||||
"start": 17,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -52,26 +52,26 @@ description: Result of parsing comparisons_multiple.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"start": 7,
|
||||
"start": 0,
|
||||
"type": "BinaryExpression",
|
||||
"type": "BinaryExpression"
|
||||
},
|
||||
{
|
||||
"end": 45,
|
||||
"end": 0,
|
||||
"raw": "\"this should not compile\"",
|
||||
"start": 20,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "this should not compile"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 6,
|
||||
"end": 0,
|
||||
"name": "assert",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 46,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
@ -81,7 +81,7 @@ description: Result of parsing comparisons_multiple.kcl
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"end": 47,
|
||||
"end": 0,
|
||||
"start": 0
|
||||
}
|
||||
}
|
||||
|
||||
5
rust/kcl-lib/tests/comparisons_multiple/unparsed.snap
Normal file
5
rust/kcl-lib/tests/comparisons_multiple/unparsed.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing comparisons_multiple.kcl
|
||||
---
|
||||
assert(3 == 3 == 3, "this should not compile")
|
||||
Reference in New Issue
Block a user