mirror of https://github.com/tc39/test262.git
Coverage: computed property names that evaluate to null. Fixes gh-1734
This commit is contained in:
parent
1fd417b146
commit
4375480990
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Computed property name from condition expression
|
||||
template: evaluation
|
||||
features: [computed-property-names]
|
||||
---*/
|
||||
//- ComputedPropertyName
|
||||
null
|
||||
//- value
|
||||
null
|
|
@ -70,3 +70,20 @@ assert.sameValue(
|
|||
C[/*{ComputedPropertyName}*/] = /*{value}*/,
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)] = /*{value}*/,
|
||||
/*{value}*/
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)] = /*{value}*/,
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -53,3 +53,11 @@ assert.sameValue(
|
|||
C[/*{ComputedPropertyName}*/](),
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)](),
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)](),
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -49,3 +49,11 @@ assert.sameValue(
|
|||
C[/*{ComputedPropertyName}*/],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -52,3 +52,11 @@ assert.sameValue(
|
|||
C[/*{ComputedPropertyName}*/](),
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)](),
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)](),
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -70,3 +70,20 @@ assert.sameValue(
|
|||
C[/*{ComputedPropertyName}*/] = /*{value}*/,
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)] = /*{value}*/,
|
||||
/*{value}*/
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)] = /*{value}*/,
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -53,3 +53,11 @@ assert.sameValue(
|
|||
C[/*{ComputedPropertyName}*/](),
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)](),
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)](),
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -49,3 +49,11 @@ assert.sameValue(
|
|||
C[/*{ComputedPropertyName}*/],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -52,3 +52,11 @@ assert.sameValue(
|
|||
C[/*{ComputedPropertyName}*/](),
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
c[String(/*{ComputedPropertyName}*/)](),
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
C[String(/*{ComputedPropertyName}*/)](),
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -30,3 +30,7 @@ assert.sameValue(
|
|||
o[/*{ComputedPropertyName}*/],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
o[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
|
@ -30,3 +30,7 @@ assert.sameValue(
|
|||
o[/*{ComputedPropertyName}*/],
|
||||
/*{value}*/
|
||||
);
|
||||
assert.sameValue(
|
||||
o[String(/*{ComputedPropertyName}*/)],
|
||||
/*{value}*/
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue