Added backward-compatible test that object properties have type of "Property".
(Better fix for Constellation/estraverse#4, Constellation/escodegen#80 and similar bugs)
This commit is contained in:
parent
648f3159cc
commit
dd37866fdb
574
index.html
574
index.html
File diff suppressed because it is too large
Load Diff
@ -1459,6 +1459,7 @@ test("x = { answer: 42 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "answer",
|
||||
@ -1562,6 +1563,7 @@ test("x = { if: 42 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "if",
|
||||
@ -1665,6 +1667,7 @@ test("x = { true: 42 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "true",
|
||||
@ -1768,6 +1771,7 @@ test("x = { false: 42 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "false",
|
||||
@ -1871,6 +1875,7 @@ test("x = { null: 42 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "null",
|
||||
@ -1974,6 +1979,7 @@ test("x = { \"answer\": 42 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Literal",
|
||||
value: "answer",
|
||||
@ -2077,6 +2083,7 @@ test("x = { x: 1, x: 2 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "x",
|
||||
@ -2108,6 +2115,7 @@ test("x = { x: 1, x: 2 }", {
|
||||
kind: "init"
|
||||
},
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "x",
|
||||
@ -2211,6 +2219,7 @@ test("x = { get width() { return m_width } }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "width",
|
||||
@ -2357,6 +2366,7 @@ test("x = { get undef() {} }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "undef",
|
||||
@ -2475,6 +2485,7 @@ test("x = { get if() {} }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "if",
|
||||
@ -2593,6 +2604,7 @@ test("x = { get true() {} }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "true",
|
||||
@ -2711,6 +2723,7 @@ test("x = { get false() {} }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "false",
|
||||
@ -2829,6 +2842,7 @@ test("x = { get null() {} }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "null",
|
||||
@ -2947,6 +2961,7 @@ test("x = { get \"undef\"() {} }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Literal",
|
||||
value: "undef",
|
||||
@ -3065,6 +3080,7 @@ test("x = { get 10() {} }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Literal",
|
||||
value: 10,
|
||||
@ -3183,6 +3199,7 @@ test("x = { set width(w) { m_width = w } }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "width",
|
||||
@ -3372,6 +3389,7 @@ test("x = { set if(w) { m_if = w } }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "if",
|
||||
@ -3561,6 +3579,7 @@ test("x = { set true(w) { m_true = w } }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "true",
|
||||
@ -3750,6 +3769,7 @@ test("x = { set false(w) { m_false = w } }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "false",
|
||||
@ -3939,6 +3959,7 @@ test("x = { set null(w) { m_null = w } }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "null",
|
||||
@ -4128,6 +4149,7 @@ test("x = { set \"null\"(w) { m_null = w } }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Literal",
|
||||
value: "null",
|
||||
@ -4317,6 +4339,7 @@ test("x = { set 10(w) { m_null = w } }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Literal",
|
||||
value: 10,
|
||||
@ -4506,6 +4529,7 @@ test("x = { get: 42 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "get",
|
||||
@ -4609,6 +4633,7 @@ test("x = { set: 43 }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "set",
|
||||
@ -21734,6 +21759,7 @@ test("throw { message: \"Error\" }", {
|
||||
type: "ObjectExpression",
|
||||
properties: [
|
||||
{
|
||||
type: "Property",
|
||||
key: {
|
||||
type: "Identifier",
|
||||
name: "message",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user