Files
modeling-app/src/wasm-lib/kcl/tests/array_elem_push_fail/ast.snap
Adam Chalmers 34f019305b Move tests into simulation (#4487)
Replace wasm-lib integration tests with KCL simulation tests.
2024-11-18 22:20:32 +00:00

158 lines
3.9 KiB
Plaintext

---
source: kcl/src/simulation_tests.rs
description: Result of parsing array_elem_push_fail.kcl
snapshot_kind: text
---
{
"Ok": {
"body": [
{
"declarations": [
{
"end": 15,
"id": {
"end": 3,
"name": "arr",
"start": 0,
"type": "Identifier"
},
"init": {
"elements": [
{
"end": 8,
"raw": "1",
"start": 7,
"type": "Literal",
"type": "Literal",
"value": 1
},
{
"end": 11,
"raw": "2",
"start": 10,
"type": "Literal",
"type": "Literal",
"value": 2
},
{
"end": 14,
"raw": "3",
"start": 13,
"type": "Literal",
"type": "Literal",
"value": 3
}
],
"end": 15,
"start": 6,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"start": 0,
"type": "VariableDeclarator"
}
],
"end": 15,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declarations": [
{
"end": 40,
"id": {
"end": 25,
"name": "pushedArr",
"start": 16,
"type": "Identifier"
},
"init": {
"arguments": [
{
"end": 36,
"name": "arr",
"start": 33,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 39,
"raw": "4",
"start": 38,
"type": "Literal",
"type": "Literal",
"value": 4
}
],
"callee": {
"end": 32,
"name": "push",
"start": 28,
"type": "Identifier"
},
"end": 40,
"optional": false,
"start": 28,
"type": "CallExpression",
"type": "CallExpression"
},
"start": 16,
"type": "VariableDeclarator"
}
],
"end": 40,
"kind": "const",
"start": 16,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"declarations": [
{
"end": 54,
"id": {
"end": 45,
"name": "fail",
"start": 41,
"type": "Identifier"
},
"init": {
"computed": false,
"end": 54,
"object": {
"end": 51,
"name": "arr",
"start": 48,
"type": "Identifier",
"type": "Identifier"
},
"property": {
"end": 53,
"raw": "3",
"start": 52,
"type": "Literal",
"type": "Literal",
"value": 3
},
"start": 48,
"type": "MemberExpression",
"type": "MemberExpression"
},
"start": 41,
"type": "VariableDeclarator"
}
],
"end": 54,
"kind": "const",
"start": 41,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 55,
"start": 0
}
}