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 invalid_member_object.kcl
|
||||
[
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "edge_lines_visible",
|
||||
"hidden": false
|
||||
@ -17,11 +13,7 @@ description: Artifact commands invalid_member_object.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_scene_units",
|
||||
"unit": "mm"
|
||||
@ -29,11 +21,7 @@ description: Artifact commands invalid_member_object.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
@ -42,11 +30,7 @@ description: Artifact commands invalid_member_object.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of parsing invalid_member_object.kcl
|
||||
---
|
||||
{
|
||||
@ -7,17 +7,17 @@ description: Result of parsing invalid_member_object.kcl
|
||||
"body": [
|
||||
{
|
||||
"declaration": {
|
||||
"end": 9,
|
||||
"end": 0,
|
||||
"id": {
|
||||
"end": 3,
|
||||
"end": 0,
|
||||
"name": "num",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"end": 9,
|
||||
"end": 0,
|
||||
"raw": "999",
|
||||
"start": 6,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -28,7 +28,7 @@ description: Result of parsing invalid_member_object.kcl
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 9,
|
||||
"end": 0,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -36,27 +36,27 @@ description: Result of parsing invalid_member_object.kcl
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 20,
|
||||
"end": 0,
|
||||
"id": {
|
||||
"end": 11,
|
||||
"end": 0,
|
||||
"name": "x",
|
||||
"start": 10,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"computed": false,
|
||||
"end": 20,
|
||||
"end": 0,
|
||||
"object": {
|
||||
"end": 17,
|
||||
"end": 0,
|
||||
"name": "num",
|
||||
"start": 14,
|
||||
"start": 0,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"property": {
|
||||
"end": 19,
|
||||
"end": 0,
|
||||
"raw": "3",
|
||||
"start": 18,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -64,21 +64,21 @@ description: Result of parsing invalid_member_object.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"start": 14,
|
||||
"start": 0,
|
||||
"type": "MemberExpression",
|
||||
"type": "MemberExpression"
|
||||
},
|
||||
"start": 10,
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 20,
|
||||
"end": 0,
|
||||
"kind": "const",
|
||||
"start": 10,
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"end": 21,
|
||||
"end": 0,
|
||||
"start": 0
|
||||
}
|
||||
}
|
||||
|
||||
6
rust/kcl-lib/tests/invalid_member_object/unparsed.snap
Normal file
6
rust/kcl-lib/tests/invalid_member_object/unparsed.snap
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing invalid_member_object.kcl
|
||||
---
|
||||
num = 999
|
||||
x = num[3]
|
||||
Reference in New Issue
Block a user