Skip to content
Snippets Groups Projects
Commit d50c33a5 authored by Daniel Ehrenberg's avatar Daniel Ehrenberg Committed by Rick Waldron
Browse files

Remove static fields tests

Static fields were broken up from instance fields and demoted to
Stage 2 in the November 2017 TC39 meeting. This patch removes the
test262 tests which test static class fields.
parent cb84893f
No related branches found
No related tags found
No related merge requests found
Showing
with 9 additions and 190 deletions
...@@ -20,9 +20,6 @@ info: | ...@@ -20,9 +20,6 @@ info: |
Runtime Semantics: ClassElementEvaluation Runtime Semantics: ClassElementEvaluation
ClassElement: static FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
ClassElement: FieldDefinition; ClassElement: FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
......
...@@ -20,9 +20,6 @@ info: | ...@@ -20,9 +20,6 @@ info: |
Runtime Semantics: ClassElementEvaluation Runtime Semantics: ClassElementEvaluation
ClassElement: static FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
ClassElement: FieldDefinition; ClassElement: FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
......
...@@ -20,9 +20,6 @@ info: | ...@@ -20,9 +20,6 @@ info: |
Runtime Semantics: ClassElementEvaluation Runtime Semantics: ClassElementEvaluation
ClassElement: static FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
ClassElement: FieldDefinition; ClassElement: FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
......
...@@ -20,9 +20,6 @@ info: | ...@@ -20,9 +20,6 @@ info: |
Runtime Semantics: ClassElementEvaluation Runtime Semantics: ClassElementEvaluation
ClassElement: static FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
ClassElement: FieldDefinition; ClassElement: FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
......
...@@ -20,9 +20,6 @@ info: | ...@@ -20,9 +20,6 @@ info: |
Runtime Semantics: ClassElementEvaluation Runtime Semantics: ClassElementEvaluation
ClassElement: static FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
ClassElement: FieldDefinition; ClassElement: FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
......
...@@ -20,9 +20,6 @@ info: | ...@@ -20,9 +20,6 @@ info: |
Runtime Semantics: ClassElementEvaluation Runtime Semantics: ClassElementEvaluation
ClassElement: static FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
ClassElement: FieldDefinition; ClassElement: FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
......
...@@ -20,9 +20,6 @@ info: | ...@@ -20,9 +20,6 @@ info: |
Runtime Semantics: ClassElementEvaluation Runtime Semantics: ClassElementEvaluation
ClassElement: static FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
ClassElement: FieldDefinition; ClassElement: FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
......
...@@ -20,9 +20,6 @@ info: | ...@@ -20,9 +20,6 @@ info: |
Runtime Semantics: ClassElementEvaluation Runtime Semantics: ClassElementEvaluation
ClassElement: static FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter true and object.
ClassElement: FieldDefinition; ClassElement: FieldDefinition;
Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object. Return ClassFieldDefinitionEvaluation of FieldDefinition with parameter false and object.
......
...@@ -22,17 +22,8 @@ features: [computed-property-names] ...@@ -22,17 +22,8 @@ features: [computed-property-names]
var x = "b"; var x = "b";
//- fields //- fields
static ["a"] = 39; [x] = 42; [10] = "meep"; ["not initialized"] [x] = 42; [10] = "meep"; ["not initialized"]
//- assertions //- assertions
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "a"), false);
assert.sameValue(Object.hasOwnProperty.call(c, "a"), false);
verifyProperty(C, "a", {
value: 39,
enumerable: true,
writable: true,
configurable: true
});
assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C.prototype, "b"), false);
assert.sameValue(Object.hasOwnProperty.call(C, "b"), false); assert.sameValue(Object.hasOwnProperty.call(C, "b"), false);
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
MethodDefinition MethodDefinition
static MethodDefinition static MethodDefinition
FieldDefinition ; FieldDefinition ;
static FieldDefinition ;
; ;
FieldDefinition: FieldDefinition:
...@@ -13,4 +12,4 @@ ...@@ -13,4 +12,4 @@
PrivateName PrivateName
PrivateName :: PrivateName ::
# IdentifierName # IdentifierName
\ No newline at end of file
...@@ -28,53 +28,37 @@ includes: [propertyHelper.js] ...@@ -28,53 +28,37 @@ includes: [propertyHelper.js]
---*/ ---*/
//- setup //- setup
var x = 0; var x = 1;
//- fields //- fields
static [x++] = x++;
[x++] = x++; [x++] = x++;
static [x++] = x++;
[x++] = x++; [x++] = x++;
//- assertions //- assertions
var c1 = new C(); var c1 = new C();
var c2 = new C(); var c2 = new C();
verifyProperty(C, "0", {
value: 4,
enumerable: true,
configurable: true,
writable: true,
});
verifyProperty(C, "2", {
value: 5,
enumerable: true,
configurable: true,
writable: true,
});
verifyProperty(c1, "1", { verifyProperty(c1, "1", {
value: 6, value: 3,
enumerable: true, enumerable: true,
configurable: true, configurable: true,
writable: true, writable: true,
}); });
verifyProperty(c1, "3", { verifyProperty(c1, "2", {
value: 7, value: 4,
enumerable: true, enumerable: true,
configurable: true, configurable: true,
writable: true, writable: true,
}); });
verifyProperty(c2, "1", { verifyProperty(c2, "1", {
value: 8, value: 5,
enumerable: true, enumerable: true,
configurable: true, configurable: true,
writable: true, writable: true,
}); });
verifyProperty(c2, "3", { verifyProperty(c2, "2", {
value: 9, value: 6,
enumerable: true, enumerable: true,
configurable: true, configurable: true,
writable: true, writable: true,
......
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-comp-name-
name: computed ClassElementName
---*/
throw "Test262: This statement should not be evaluated.";
var x = "string";
class C {
static [x] = /*{ initializer }*/;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-static-comp-name-
name: static computed ClassElementName
---*/
throw "Test262: This statement should not be evaluated.";
var x = "string";
class C {
static [x] = /*{ initializer }*/;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-static-literal-
name: static literal ClassElementName
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static x = /*{ initializer }*/;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-static-private-
name: static PrivateName
features: [class, class-fields-private]
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static #x = /*{ initializer }*/;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-static-string-literal-name-
name: static string literal ClassElementName
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static 'x' = /*{ initializer }*/;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-static-comp-name-
name: static computed ClassElementName
---*/
throw "Test262: This statement should not be evaluated.";
var x = "string";
var C = class {
static [x] = /*{ initializer }*/;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-static-literal-
name: static literal ClassElementName
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static x = /*{ initializer }*/;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-static-private-
name: static PrivateName
features: [class, class-fields-private]
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static #x = /*{ initializer }*/;
}
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-static-string-literal-name-
name: static string literal ClassElementName
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static 'x' = /*{ initializer }*/;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment