Open
Description
openedon Jul 30, 2017
As suggested by @littledan, here is a TODO list proposal with the tests that we should have for the class fields feature. The format is: - [checkbox] Description (asigned to)
Some doubts about this:
- Do we need to test every type of field in every possible combination with methods in class? Seems it would be at least: a field by itself; a field before a method; a field after a method; a field between methods. The V8 tests I looked at seemed satisfied with the first two options only.
- How much information about the spec should there be on each line? And what format to use?
Runtime
- FieldDefinition: LiteralPropertyName Initializer; a = 0; ()
- FieldDefinition: LiteralPropertyName Initializer; LiteralPropertyName; a = 0; b; (@xanlpz)
- FieldDefinition: LiteralPropertyName Initializer; MethodDefinition; a = 0; b() {}; (@xanlpz)
- FieldDefinition: LiteralPropertyName Initializer; GeneratorMethod; a = 0; *b() {}; (@xanlpz)
- FieldDefinition: LiteralPropertyName Initializer; MethodDefinition + ComputedPropertyName; a = 0; 'b' {}; (@xanlpz)
- FieldDefinition: LiteralPropertyName; a; (@xanlpz)
- FieldDefinition: LiteralPropertyName; LiteralPropertyName; a; b; (@xanlpz)
- FieldDefinition: LiteralPropertyName; MethodDefinition; a; b() {}; (@xanlpz)
- FieldDefinition: LiteralPropertyName; GeneratorMethod; a; *b() {}; (@xanlpz)
- FieldDefinition: LiteralPropertyName; MethodDefinition + ComputedPropertyName; a; 'b' {}; (@xanlpz)
- FieldDefinition: ComputedPropertyName Initializer; ['a'] = 0; (@xanlpz)
- FieldDefinition: ComputedPropertyName Initializer; LiteralPropertyName; ['a'] = 0; b; (@xanlpz)
- FieldDefinition: ComputedPropertyName Initializer; MethodDefinition; ['a'] = 0; b() {}; (@xanlpz)
- FieldDefinition: ComputedPropertyName Initializer; GeneratorMethod; ['a'] = 0; *b() {}; (@xanlpz)
- FieldDefinition: ComputedPropertyName Initializer; MethodDefinition + ComputedPropertyName; ['a'] = 0; 'b' {}; (@xanlpz)
- FieldDefinition: ComputedPropertyName; ['a']; (@xanlpz)
- FieldDefinition: ComputedPropertyName; LiteralPropertyName; ['a']; b; (@xanlpz)
- FieldDefinition: ComputedPropertyName; MethodDefinition; ['a']; b() {}; (@xanlpz)
- FieldDefinition: ComputedPropertyName; GeneratorMethod; ['a']; *b() {}; (@xanlpz)
- FieldDefinition: ComputedPropertyName; MethodDefinition + ComputedPropertyName; ['a']; 'b' {}; (@xanlpz)
- FieldDefinition: NumericLiteral Initializer; 0 = 0; (@xanlpz)
- FieldDefinition: NumericLiteral; 0; (@xanlpz)
- FieldDefinition: StringLiteral Initializer; 'a' = 0; (@xanlpz)
- FieldDefinition: StringLiteral; 'a'; (@xanlpz)
Static
- ClassElement: static FieldDefinition; throws SyntaxError if PropName is "prototype". ()
- ClassElement: static FieldDefinition; throws SyntaxError if PropName is "constructor". ()
- ClassElement: FieldDefinition; throws SyntaxError if PropName is "constructor". ()
- ClassElement: PrivateName; throws SyntaxError if PropName is "#constructor". ()
(Initial example, after we agree on a format I will continue adding examples and errors referenced in the spec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels