react / wstein / node_modules / jest-cli / node_modules / istanbul / node_modules / esprima / test / reflect.js
80684 views// This is modified from Mozilla Reflect.parse test suite (the file is located1// at js/src/tests/js1_8_5/extensions/reflect-parse.js in the source tree).2//3// Some notable changes:4// * Removed unsupported features (destructuring, let, comprehensions...).5// * Removed tests for E4X (ECMAScript for XML).6// * Removed everything related to builder.7// * Enclosed every 'Pattern' construct with a scope.8// * Tweaked some expected tree to remove generator field.9// * Removed the test for bug 632030 and bug 632024.1011/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */12/*13* Any copyright is dedicated to the Public Domain.14* http://creativecommons.org/licenses/publicdomain/15*/1617(function (exports) {1819function testReflect(Reflect, Pattern) {2021function program(elts) { return Pattern({ type: "Program", body: elts }); }22function exprStmt(expr) { return Pattern({ type: "ExpressionStatement", expression: expr }); }23function throwStmt(expr) { return Pattern({ type: "ThrowStatement", argument: expr }); }24function returnStmt(expr) { return Pattern({ type: "ReturnStatement", argument: expr }); }25function yieldExpr(expr) { return Pattern({ type: "YieldExpression", argument: expr }); }26function lit(val) { return Pattern({ type: "Literal", value: val }); }27var thisExpr = Pattern({ type: "ThisExpression" });28function funDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration",29id: id,30params: params,31defaults: [],32body: body,33generator: false,34expression: false35}); }36function genFunDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration",37id: id,38params: params,39defaults: [],40body: body,41generator: false,42expression: false43}); }44function declarator(id, init) { return Pattern({ type: "VariableDeclarator", id: id, init: init }); }45function varDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "var" }); }46function letDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "let" }); }47function constDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "const" }); }48function ident(name) { return Pattern({ type: "Identifier", name: name }); }49function dotExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: false, object: obj, property: id }); }50function memExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: true, object: obj, property: id }); }51function forStmt(init, test, update, body) { return Pattern({ type: "ForStatement", init: init, test: test, update: update, body: body }); }52function forInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: false }); }53function forEachInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: true }); }54function breakStmt(lab) { return Pattern({ type: "BreakStatement", label: lab }); }55function continueStmt(lab) { return Pattern({ type: "ContinueStatement", label: lab }); }56function blockStmt(body) { return Pattern({ type: "BlockStatement", body: body }); }57var emptyStmt = Pattern({ type: "EmptyStatement" });58function ifStmt(test, cons, alt) { return Pattern({ type: "IfStatement", test: test, alternate: alt, consequent: cons }); }59function labStmt(lab, stmt) { return Pattern({ type: "LabeledStatement", label: lab, body: stmt }); }60function withStmt(obj, stmt) { return Pattern({ type: "WithStatement", object: obj, body: stmt }); }61function whileStmt(test, stmt) { return Pattern({ type: "WhileStatement", test: test, body: stmt }); }62function doStmt(stmt, test) { return Pattern({ type: "DoWhileStatement", test: test, body: stmt }); }63function switchStmt(disc, cases) { return Pattern({ type: "SwitchStatement", discriminant: disc, cases: cases }); }64function caseClause(test, stmts) { return Pattern({ type: "SwitchCase", test: test, consequent: stmts }); }65function defaultClause(stmts) { return Pattern({ type: "SwitchCase", test: null, consequent: stmts }); }66function catchClause(id, guard, body) { if (guard) { return Pattern({ type: "GuardedCatchClause", param: id, guard: guard, body: body }) } else { return Pattern({ type: "CatchClause", param: id, body: body }); } }67function tryStmt(body, guarded, catches, fin) { return Pattern({ type: "TryStatement", block: body, guardedHandlers: guarded, handlers: catches, handler: (catches.length > 0) ? catches[0] : null, finalizer: fin }); }68function letStmt(head, body) { return Pattern({ type: "LetStatement", head: head, body: body }); }69function funExpr(id, args, body, gen) { return Pattern({ type: "FunctionExpression",70id: id,71params: args,72defaults: [],73body: body,74generator: false,75expression: false76}); }77function genFunExpr(id, args, body) { return Pattern({ type: "FunctionExpression",78id: id,79params: args,80defaults: [],81body: body,82generator: false,83expression: false84}); }8586function unExpr(op, arg) { return Pattern({ type: "UnaryExpression", operator: op, argument: arg, prefix: true }); }87function binExpr(op, left, right) { return Pattern({ type: "BinaryExpression", operator: op, left: left, right: right }); }88function aExpr(op, left, right) { return Pattern({ type: "AssignmentExpression", operator: op, left: left, right: right }); }89function updExpr(op, arg, prefix) { return Pattern({ type: "UpdateExpression", operator: op, argument: arg, prefix: prefix }); }90function logExpr(op, left, right) { return Pattern({ type: "LogicalExpression", operator: op, left: left, right: right }); }9192function condExpr(test, cons, alt) { return Pattern({ type: "ConditionalExpression", test: test, consequent: cons, alternate: alt }); }93function seqExpr(exprs) { return Pattern({ type: "SequenceExpression", expressions: exprs }); }94function newExpr(callee, args) { return Pattern({ type: "NewExpression", callee: callee, arguments: args }); }95function callExpr(callee, args) { return Pattern({ type: "CallExpression", callee: callee, arguments: args }); }96function arrExpr(elts) { return Pattern({ type: "ArrayExpression", elements: elts }); }97function objExpr(elts) { return Pattern({ type: "ObjectExpression", properties: elts }); }98function objProp(key, value, kind) { return Pattern({ type: "Property", key: key, computed: false, value: value, kind: kind, method: false, shorthand: false }); }99100function arrPatt(elts) { return Pattern({ type: "ArrayPattern", elements: elts }); }101function objPatt(elts) { return Pattern({ type: "ObjectPattern", properties: elts }); }102103function localSrc(src) { return "(function(){ " + src + " })"; }104function localPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([patt])))]); }105function blockSrc(src) { return "(function(){ { " + src + " } })"; }106function blockPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([blockStmt([patt])])))]); }107108function assertBlockStmt(src, patt) {109blockPatt(patt).assert(Reflect.parse(blockSrc(src)));110}111112function assertBlockExpr(src, patt) {113assertBlockStmt(src, exprStmt(patt));114}115116function assertBlockDecl(src, patt, builder) {117blockPatt(patt).assert(Reflect.parse(blockSrc(src), {builder: builder}));118}119120function assertLocalStmt(src, patt) {121localPatt(patt).assert(Reflect.parse(localSrc(src)));122}123124function assertLocalExpr(src, patt) {125assertLocalStmt(src, exprStmt(patt));126}127128function assertLocalDecl(src, patt) {129localPatt(patt).assert(Reflect.parse(localSrc(src)));130}131132function assertGlobalStmt(src, patt, builder) {133program([patt]).assert(Reflect.parse(src, {builder: builder}));134}135136function assertGlobalExpr(src, patt, builder) {137program([exprStmt(patt)]).assert(Reflect.parse(src, {builder: builder}));138//assertStmt(src, exprStmt(patt));139}140141function assertGlobalDecl(src, patt) {142program([patt]).assert(Reflect.parse(src));143}144145function assertProg(src, patt) {146program(patt).assert(Reflect.parse(src));147}148149function assertStmt(src, patt) {150assertLocalStmt(src, patt);151assertGlobalStmt(src, patt);152assertBlockStmt(src, patt);153}154155function assertExpr(src, patt) {156assertLocalExpr(src, patt);157assertGlobalExpr(src, patt);158assertBlockExpr(src, patt);159}160161function assertDecl(src, patt) {162assertLocalDecl(src, patt);163assertGlobalDecl(src, patt);164assertBlockDecl(src, patt);165}166167function assertError(src, errorType) {168try {169Reflect.parse(src);170} catch (e) {171return;172}173throw new Error("expected " + errorType.name + " for " + uneval(src));174}175176177// general tests178179// NB: These are useful but for now jit-test doesn't do I/O reliably.180181//program(_).assert(Reflect.parse(snarf('data/flapjax.txt')));182//program(_).assert(Reflect.parse(snarf('data/jquery-1.4.2.txt')));183//program(_).assert(Reflect.parse(snarf('data/prototype.js')));184//program(_).assert(Reflect.parse(snarf('data/dojo.js.uncompressed.js')));185//program(_).assert(Reflect.parse(snarf('data/mootools-1.2.4-core-nc.js')));186187188// declarations189190assertDecl("var x = 1, y = 2, z = 3",191varDecl([declarator(ident("x"), lit(1)),192declarator(ident("y"), lit(2)),193declarator(ident("z"), lit(3))]));194assertDecl("var x, y, z",195varDecl([declarator(ident("x"), null),196declarator(ident("y"), null),197declarator(ident("z"), null)]));198assertDecl("function foo() { }",199funDecl(ident("foo"), [], blockStmt([])));200assertDecl("function foo() { return 42 }",201funDecl(ident("foo"), [], blockStmt([returnStmt(lit(42))])));202203204// Bug 591437: rebound args have their defs turned into uses205assertDecl("function f(a) { function a() { } }",206funDecl(ident("f"), [ident("a")], blockStmt([funDecl(ident("a"), [], blockStmt([]))])));207assertDecl("function f(a,b,c) { function b() { } }",208funDecl(ident("f"), [ident("a"),ident("b"),ident("c")], blockStmt([funDecl(ident("b"), [], blockStmt([]))])));209210// expressions211212assertExpr("true", lit(true));213assertExpr("false", lit(false));214assertExpr("42", lit(42));215assertExpr("(/asdf/)", lit(/asdf/));216assertExpr("this", thisExpr);217assertExpr("foo", ident("foo"));218assertExpr("foo.bar", dotExpr(ident("foo"), ident("bar")));219assertExpr("foo[bar]", memExpr(ident("foo"), ident("bar")));220assertExpr("(function(){})", funExpr(null, [], blockStmt([])));221assertExpr("(function f() {})", funExpr(ident("f"), [], blockStmt([])));222assertExpr("(function f(x,y,z) {})", funExpr(ident("f"), [ident("x"),ident("y"),ident("z")], blockStmt([])));223assertExpr("(++x)", updExpr("++", ident("x"), true));224assertExpr("(x++)", updExpr("++", ident("x"), false));225assertExpr("(+x)", unExpr("+", ident("x")));226assertExpr("(-x)", unExpr("-", ident("x")));227assertExpr("(!x)", unExpr("!", ident("x")));228assertExpr("(~x)", unExpr("~", ident("x")));229assertExpr("(delete x)", unExpr("delete", ident("x")));230assertExpr("(typeof x)", unExpr("typeof", ident("x")));231assertExpr("(void x)", unExpr("void", ident("x")));232assertExpr("(x == y)", binExpr("==", ident("x"), ident("y")));233assertExpr("(x != y)", binExpr("!=", ident("x"), ident("y")));234assertExpr("(x === y)", binExpr("===", ident("x"), ident("y")));235assertExpr("(x !== y)", binExpr("!==", ident("x"), ident("y")));236assertExpr("(x < y)", binExpr("<", ident("x"), ident("y")));237assertExpr("(x <= y)", binExpr("<=", ident("x"), ident("y")));238assertExpr("(x > y)", binExpr(">", ident("x"), ident("y")));239assertExpr("(x >= y)", binExpr(">=", ident("x"), ident("y")));240assertExpr("(x << y)", binExpr("<<", ident("x"), ident("y")));241assertExpr("(x >> y)", binExpr(">>", ident("x"), ident("y")));242assertExpr("(x >>> y)", binExpr(">>>", ident("x"), ident("y")));243assertExpr("(x + y)", binExpr("+", ident("x"), ident("y")));244assertExpr("(w + x + y + z)", binExpr("+", binExpr("+", binExpr("+", ident("w"), ident("x")), ident("y")), ident("z")));245assertExpr("(x - y)", binExpr("-", ident("x"), ident("y")));246assertExpr("(w - x - y - z)", binExpr("-", binExpr("-", binExpr("-", ident("w"), ident("x")), ident("y")), ident("z")));247assertExpr("(x * y)", binExpr("*", ident("x"), ident("y")));248assertExpr("(x / y)", binExpr("/", ident("x"), ident("y")));249assertExpr("(x % y)", binExpr("%", ident("x"), ident("y")));250assertExpr("(x | y)", binExpr("|", ident("x"), ident("y")));251assertExpr("(x ^ y)", binExpr("^", ident("x"), ident("y")));252assertExpr("(x & y)", binExpr("&", ident("x"), ident("y")));253assertExpr("(x in y)", binExpr("in", ident("x"), ident("y")));254assertExpr("(x instanceof y)", binExpr("instanceof", ident("x"), ident("y")));255assertExpr("(x = y)", aExpr("=", ident("x"), ident("y")));256assertExpr("(x += y)", aExpr("+=", ident("x"), ident("y")));257assertExpr("(x -= y)", aExpr("-=", ident("x"), ident("y")));258assertExpr("(x *= y)", aExpr("*=", ident("x"), ident("y")));259assertExpr("(x /= y)", aExpr("/=", ident("x"), ident("y")));260assertExpr("(x %= y)", aExpr("%=", ident("x"), ident("y")));261assertExpr("(x <<= y)", aExpr("<<=", ident("x"), ident("y")));262assertExpr("(x >>= y)", aExpr(">>=", ident("x"), ident("y")));263assertExpr("(x >>>= y)", aExpr(">>>=", ident("x"), ident("y")));264assertExpr("(x |= y)", aExpr("|=", ident("x"), ident("y")));265assertExpr("(x ^= y)", aExpr("^=", ident("x"), ident("y")));266assertExpr("(x &= y)", aExpr("&=", ident("x"), ident("y")));267assertExpr("(x || y)", logExpr("||", ident("x"), ident("y")));268assertExpr("(x && y)", logExpr("&&", ident("x"), ident("y")));269assertExpr("(w || x || y || z)", logExpr("||", logExpr("||", logExpr("||", ident("w"), ident("x")), ident("y")), ident("z")));270assertExpr("(x ? y : z)", condExpr(ident("x"), ident("y"), ident("z")));271assertExpr("(x,y)", seqExpr([ident("x"),ident("y")]));272assertExpr("(x,y,z)", seqExpr([ident("x"),ident("y"),ident("z")]));273assertExpr("(a,b,c,d,e,f,g)", seqExpr([ident("a"),ident("b"),ident("c"),ident("d"),ident("e"),ident("f"),ident("g")]));274assertExpr("(new Object)", newExpr(ident("Object"), []));275assertExpr("(new Object())", newExpr(ident("Object"), []));276assertExpr("(new Object(42))", newExpr(ident("Object"), [lit(42)]));277assertExpr("(new Object(1,2,3))", newExpr(ident("Object"), [lit(1),lit(2),lit(3)]));278assertExpr("(String())", callExpr(ident("String"), []));279assertExpr("(String(42))", callExpr(ident("String"), [lit(42)]));280assertExpr("(String(1,2,3))", callExpr(ident("String"), [lit(1),lit(2),lit(3)]));281assertExpr("[]", arrExpr([]));282assertExpr("[1]", arrExpr([lit(1)]));283assertExpr("[1,2]", arrExpr([lit(1),lit(2)]));284assertExpr("[1,2,3]", arrExpr([lit(1),lit(2),lit(3)]));285assertExpr("[1,,2,3]", arrExpr([lit(1),,lit(2),lit(3)]));286assertExpr("[1,,,2,3]", arrExpr([lit(1),,,lit(2),lit(3)]));287assertExpr("[1,,,2,,3]", arrExpr([lit(1),,,lit(2),,lit(3)]));288assertExpr("[1,,,2,,,3]", arrExpr([lit(1),,,lit(2),,,lit(3)]));289assertExpr("[,1,2,3]", arrExpr([,lit(1),lit(2),lit(3)]));290assertExpr("[,,1,2,3]", arrExpr([,,lit(1),lit(2),lit(3)]));291assertExpr("[,,,1,2,3]", arrExpr([,,,lit(1),lit(2),lit(3)]));292assertExpr("[,,,1,2,3,]", arrExpr([,,,lit(1),lit(2),lit(3)]));293assertExpr("[,,,1,2,3,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined]));294assertExpr("[,,,1,2,3,,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined,undefined]));295assertExpr("[,,,,,]", arrExpr([undefined,undefined,undefined,undefined,undefined]));296assertExpr("({})", objExpr([]));297assertExpr("({x:1})", objExpr([objProp(ident("x"), lit(1), "init")]));298assertExpr("({x:1, y:2})", objExpr([objProp(ident("x"), lit(1), "init"),299objProp(ident("y"), lit(2), "init")]));300assertExpr("({x:1, y:2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"),301objProp(ident("y"), lit(2), "init"),302objProp(ident("z"), lit(3), "init") ]));303assertExpr("({x:1, 'y':2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"),304objProp(lit("y"), lit(2), "init"),305objProp(ident("z"), lit(3), "init") ]));306assertExpr("({'x':1, 'y':2, z:3})", objExpr([objProp(lit("x"), lit(1), "init"),307objProp(lit("y"), lit(2), "init"),308objProp(ident("z"), lit(3), "init") ]));309assertExpr("({'x':1, 'y':2, 3:3})", objExpr([objProp(lit("x"), lit(1), "init"),310objProp(lit("y"), lit(2), "init"),311objProp(lit(3), lit(3), "init") ]));312313// Bug 571617: eliminate constant-folding314assertExpr("2 + 3", binExpr("+", lit(2), lit(3)));315316// Bug 632026: constant-folding317assertExpr("typeof(0?0:a)", unExpr("typeof", condExpr(lit(0), lit(0), ident("a"))));318319// Bug 632056: constant-folding320program([exprStmt(ident("f")),321ifStmt(lit(1),322funDecl(ident("f"), [], blockStmt([])),323null)]).assert(Reflect.parse("f; if (1) function f(){}"));324325// statements326327assertStmt("throw 42", throwStmt(lit(42)));328assertStmt("for (;;) break", forStmt(null, null, null, breakStmt(null)));329assertStmt("for (x; y; z) break", forStmt(ident("x"), ident("y"), ident("z"), breakStmt(null)));330assertStmt("for (var x; y; z) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), ident("z"), breakStmt(null)));331assertStmt("for (var x = 42; y; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), ident("y"), ident("z"), breakStmt(null)));332assertStmt("for (x; ; z) break", forStmt(ident("x"), null, ident("z"), breakStmt(null)));333assertStmt("for (var x; ; z) break", forStmt(varDecl([declarator(ident("x"), null)]), null, ident("z"), breakStmt(null)));334assertStmt("for (var x = 42; ; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), null, ident("z"), breakStmt(null)));335assertStmt("for (x; y; ) break", forStmt(ident("x"), ident("y"), null, breakStmt(null)));336assertStmt("for (var x; y; ) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), null, breakStmt(null)));337assertStmt("for (var x = 42; y; ) break", forStmt(varDecl([declarator(ident("x"),lit(42))]), ident("y"), null, breakStmt(null)));338assertStmt("for (var x in y) break", forInStmt(varDecl([declarator(ident("x"),null)]), ident("y"), breakStmt(null)));339assertStmt("for (x in y) break", forInStmt(ident("x"), ident("y"), breakStmt(null)));340assertStmt("{ }", blockStmt([]));341assertStmt("{ throw 1; throw 2; throw 3; }", blockStmt([ throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]));342assertStmt(";", emptyStmt);343assertStmt("if (foo) throw 42;", ifStmt(ident("foo"), throwStmt(lit(42)), null));344assertStmt("if (foo) throw 42; else true;", ifStmt(ident("foo"), throwStmt(lit(42)), exprStmt(lit(true))));345assertStmt("if (foo) { throw 1; throw 2; throw 3; }",346ifStmt(ident("foo"),347blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]),348null));349assertStmt("if (foo) { throw 1; throw 2; throw 3; } else true;",350ifStmt(ident("foo"),351blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]),352exprStmt(lit(true))));353assertStmt("foo: for(;;) break foo;", labStmt(ident("foo"), forStmt(null, null, null, breakStmt(ident("foo")))));354assertStmt("foo: for(;;) continue foo;", labStmt(ident("foo"), forStmt(null, null, null, continueStmt(ident("foo")))));355assertStmt("with (obj) { }", withStmt(ident("obj"), blockStmt([])));356assertStmt("with (obj) { obj; }", withStmt(ident("obj"), blockStmt([exprStmt(ident("obj"))])));357assertStmt("while (foo) { }", whileStmt(ident("foo"), blockStmt([])));358assertStmt("while (foo) { foo; }", whileStmt(ident("foo"), blockStmt([exprStmt(ident("foo"))])));359assertStmt("do { } while (foo);", doStmt(blockStmt([]), ident("foo")));360assertStmt("do { foo; } while (foo)", doStmt(blockStmt([exprStmt(ident("foo"))]), ident("foo")));361assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; }",362switchStmt(ident("foo"),363[ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]),364caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]),365defaultClause([ exprStmt(lit(3)) ]) ]));366assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; case 42: 42; }",367switchStmt(ident("foo"),368[ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]),369caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]),370defaultClause([ exprStmt(lit(3)) ]),371caseClause(lit(42), [ exprStmt(lit(42)) ]) ]));372assertStmt("try { } catch (e) { }",373tryStmt(blockStmt([]),374[],375[ catchClause(ident("e"), null, blockStmt([])) ],376null));377assertStmt("try { } catch (e) { } finally { }",378tryStmt(blockStmt([]),379[],380[ catchClause(ident("e"), null, blockStmt([])) ],381blockStmt([])));382assertStmt("try { } finally { }",383tryStmt(blockStmt([]),384[],385[],386blockStmt([])));387388// redeclarations (TOK_NAME nodes with lexdef)389390assertStmt("function f() { function g() { } function g() { } }",391funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),392funDecl(ident("g"), [], blockStmt([]))])));393394assertStmt("function f() { function g() { } function g() { return 42 } }",395funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),396funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))])));397398assertStmt("function f() { var x = 42; var x = 43; }",399funDecl(ident("f"), [], blockStmt([varDecl([declarator(ident("x"),lit(42))]),400varDecl([declarator(ident("x"),lit(43))])])));401402// getters and setters403404assertExpr("({ get x() { return 42 } })",405objExpr([ objProp(ident("x"),406funExpr(null, [], blockStmt([returnStmt(lit(42))])),407"get" ) ]));408assertExpr("({ set x(v) { return 42 } })",409objExpr([ objProp(ident("x"),410funExpr(null, [ident("v")], blockStmt([returnStmt(lit(42))])),411"set" ) ]));412413}414415exports.testReflect = testReflect;416417}(typeof exports === 'undefined' ? this : exports));418419420