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 circle_three_point.kcl
|
||||
[
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "edge_lines_visible",
|
||||
"hidden": false
|
||||
@ -17,11 +13,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "set_scene_units",
|
||||
"unit": "mm"
|
||||
@ -29,11 +21,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
@ -42,11 +30,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_visible",
|
||||
"object_id": "[uuid]",
|
||||
@ -55,11 +39,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
12,
|
||||
31,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "make_plane",
|
||||
"origin": {
|
||||
@ -84,11 +64,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
@ -104,22 +80,14 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "start_path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "move_path_pen",
|
||||
"path": "[uuid]",
|
||||
@ -132,22 +100,14 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extend_path",
|
||||
"path": "[uuid]",
|
||||
@ -172,11 +132,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "close_path",
|
||||
"path_id": "[uuid]"
|
||||
@ -184,11 +140,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "enable_sketch_mode",
|
||||
"entity_id": "[uuid]",
|
||||
@ -204,11 +156,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "extrude",
|
||||
"target": "[uuid]",
|
||||
@ -218,22 +166,14 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "sketch_mode_disable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "object_bring_to_front",
|
||||
"object_id": "[uuid]"
|
||||
@ -241,11 +181,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_extrusion_face_info",
|
||||
"object_id": "[uuid]",
|
||||
@ -254,11 +190,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_opposite_edge",
|
||||
"object_id": "[uuid]",
|
||||
@ -268,11 +200,7 @@ description: Artifact commands circle_three_point.kcl
|
||||
},
|
||||
{
|
||||
"cmdId": "[uuid]",
|
||||
"range": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
],
|
||||
"range": [],
|
||||
"command": {
|
||||
"type": "solid3d_get_next_adjacent_edge",
|
||||
"object_id": "[uuid]",
|
||||
|
||||
@ -7,9 +7,9 @@ description: Result of parsing circle_three_point.kcl
|
||||
"body": [
|
||||
{
|
||||
"declaration": {
|
||||
"end": 124,
|
||||
"end": 0,
|
||||
"id": {
|
||||
"end": 9,
|
||||
"end": 0,
|
||||
"name": "sketch001",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
@ -19,22 +19,22 @@ description: Result of parsing circle_three_point.kcl
|
||||
{
|
||||
"arguments": [
|
||||
{
|
||||
"end": 30,
|
||||
"end": 0,
|
||||
"raw": "'XY'",
|
||||
"start": 26,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XY"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 25,
|
||||
"end": 0,
|
||||
"name": "startSketchOn",
|
||||
"start": 12,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 31,
|
||||
"start": 12,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
@ -43,17 +43,17 @@ description: Result of parsing circle_three_point.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 56,
|
||||
"end": 0,
|
||||
"name": "p1",
|
||||
"start": 54,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 62,
|
||||
"end": 0,
|
||||
"raw": "25",
|
||||
"start": 60,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -62,9 +62,9 @@ description: Result of parsing circle_three_point.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 66,
|
||||
"end": 0,
|
||||
"raw": "25",
|
||||
"start": 64,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -73,8 +73,8 @@ description: Result of parsing circle_three_point.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 67,
|
||||
"start": 59,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
@ -82,17 +82,17 @@ description: Result of parsing circle_three_point.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 71,
|
||||
"end": 0,
|
||||
"name": "p2",
|
||||
"start": 69,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 77,
|
||||
"end": 0,
|
||||
"raw": "30",
|
||||
"start": 75,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -101,9 +101,9 @@ description: Result of parsing circle_three_point.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 81,
|
||||
"end": 0,
|
||||
"raw": "20",
|
||||
"start": 79,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -112,8 +112,8 @@ description: Result of parsing circle_three_point.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 82,
|
||||
"start": 74,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
@ -121,17 +121,17 @@ description: Result of parsing circle_three_point.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 86,
|
||||
"end": 0,
|
||||
"name": "p3",
|
||||
"start": 84,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"elements": [
|
||||
{
|
||||
"end": 92,
|
||||
"end": 0,
|
||||
"raw": "27",
|
||||
"start": 90,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -140,9 +140,9 @@ description: Result of parsing circle_three_point.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 96,
|
||||
"end": 0,
|
||||
"raw": "15",
|
||||
"start": 94,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -151,21 +151,21 @@ description: Result of parsing circle_three_point.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 97,
|
||||
"start": 89,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 53,
|
||||
"end": 0,
|
||||
"name": "circleThreePoint",
|
||||
"start": 37,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 98,
|
||||
"start": 37,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
@ -175,15 +175,15 @@ description: Result of parsing circle_three_point.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 118,
|
||||
"end": 0,
|
||||
"name": "length",
|
||||
"start": 112,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 123,
|
||||
"end": 0,
|
||||
"raw": "10",
|
||||
"start": 121,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -194,34 +194,34 @@ description: Result of parsing circle_three_point.kcl
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 111,
|
||||
"end": 0,
|
||||
"name": "extrude",
|
||||
"start": 104,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 124,
|
||||
"start": 104,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
}
|
||||
],
|
||||
"end": 124,
|
||||
"start": 12,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "PipeExpression",
|
||||
"type": "PipeExpression"
|
||||
},
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 124,
|
||||
"end": 0,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"end": 125,
|
||||
"end": 0,
|
||||
"start": 0
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,19 +10,11 @@ description: Operations executed circle_three_point.kcl
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
},
|
||||
"sourceRange": [
|
||||
26,
|
||||
30,
|
||||
0
|
||||
]
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "startSketchOn",
|
||||
"sourceRange": [
|
||||
12,
|
||||
31,
|
||||
0
|
||||
],
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": null
|
||||
},
|
||||
@ -42,19 +34,11 @@ description: Operations executed circle_three_point.kcl
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
121,
|
||||
123,
|
||||
0
|
||||
]
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "extrude",
|
||||
"sourceRange": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
],
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
@ -63,11 +47,7 @@ description: Operations executed circle_three_point.kcl
|
||||
"artifactId": "[uuid]"
|
||||
}
|
||||
},
|
||||
"sourceRange": [
|
||||
104,
|
||||
124,
|
||||
0
|
||||
]
|
||||
"sourceRange": []
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -13,11 +13,7 @@ description: Variables in memory after executing circle_three_point.kcl
|
||||
{
|
||||
"faceId": "[uuid]",
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
],
|
||||
"sourceRange": [],
|
||||
"tag": null,
|
||||
"type": "extrudeArc"
|
||||
}
|
||||
@ -29,11 +25,7 @@ description: Variables in memory after executing circle_three_point.kcl
|
||||
{
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
]
|
||||
"sourceRange": []
|
||||
},
|
||||
"from": [
|
||||
30.0059,
|
||||
@ -106,11 +98,7 @@ description: Variables in memory after executing circle_three_point.kcl
|
||||
"tag": null,
|
||||
"__geoMeta": {
|
||||
"id": "[uuid]",
|
||||
"sourceRange": [
|
||||
37,
|
||||
98,
|
||||
0
|
||||
]
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"artifactId": "[uuid]",
|
||||
|
||||
7
rust/kcl-lib/tests/circle_three_point/unparsed.snap
Normal file
7
rust/kcl-lib/tests/circle_three_point/unparsed.snap
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of unparsing circle_three_point.kcl
|
||||
---
|
||||
sketch001 = startSketchOn('XY')
|
||||
|> circleThreePoint(p1 = [25, 25], p2 = [30, 20], p3 = [27, 15])
|
||||
|> extrude(length = 10)
|
||||
Reference in New Issue
Block a user