mirror of https://github.com/tc39/test262.git
Merge pull request #601 from bocoup/generator-noise
Reduce noise in output of test generation tool
This commit is contained in:
commit
efd84de3e7
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (arrow function expression)
|
||||
es6id: 14.2.16
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ArrowFunction : ArrowParameters => ConciseBody
|
||||
|
||||
[...]
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
description: Spread operator applied to the only argument when evaluation throws (CallExpression)
|
||||
es6id: 12.3.4.1
|
||||
features: [generators]
|
||||
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
CallExpression : MemberExpression Arguments
|
||||
|
||||
[...]
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
description: Spread operator applied to the only argument with a valid iterator (CallExpression)
|
||||
es6id: 12.3.4.1
|
||||
features: [Symbol.iterator]
|
||||
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
CallExpression : MemberExpression Arguments
|
||||
|
||||
[...]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (class expression method)
|
||||
es6id: 14.5.16
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (static class expression generator method)
|
||||
es6id: 14.5.16
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (class expression method)
|
||||
es6id: 14.5.16
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (static class expression method)
|
||||
es6id: 14.5.16
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ClassExpression : class BindingIdentifieropt ClassTail
|
||||
|
||||
1. If BindingIdentifieropt is not present, let className be undefined.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (function expression)
|
||||
es6id: 14.1.20
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
FunctionExpression : function ( FormalParameters ) { FunctionBody }
|
||||
|
||||
[...]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (generator function expression)
|
||||
es6id: 14.4.14
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
GeneratorExpression : function * ( FormalParameters ) { GeneratorBody }
|
||||
|
||||
[...]
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
description: Spread operator applied to the only argument when evaluation throws (`new` operator)
|
||||
es6id: 12.3.3.1
|
||||
features: [generators]
|
||||
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
MemberExpression : new MemberExpression Arguments
|
||||
|
||||
1. Return EvaluateNew(MemberExpression, Arguments).
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
description: Spread operator applied to the only argument with a valid iterator (`new` operator)
|
||||
es6id: 12.3.3.1
|
||||
features: [Symbol.iterator]
|
||||
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
MemberExpression : new MemberExpression Arguments
|
||||
|
||||
1. Return EvaluateNew(MemberExpression, Arguments).
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (generator method)
|
||||
es6id: 14.4.13
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
GeneratorMethod :
|
||||
* PropertyName ( StrictFormalParameters ) { GeneratorBody }
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (method)
|
||||
es6id: 14.3.8
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody }
|
||||
|
||||
[...]
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
description: Spread operator applied to the only argument when evaluation throws (SuperCall)
|
||||
es6id: 12.3.5.1
|
||||
features: [generators]
|
||||
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
SuperCall : super Arguments
|
||||
|
||||
1. Let newTarget be GetNewTarget().
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
description: Spread operator applied to the only argument with a valid iterator (SuperCall)
|
||||
es6id: 12.3.5.1
|
||||
features: [Symbol.iterator]
|
||||
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
SuperCall : super Arguments
|
||||
|
||||
1. Let newTarget be GetNewTarget().
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (class expression method)
|
||||
es6id: 14.5.16
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (static class expression generator method)
|
||||
es6id: 14.5.15
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (class expression method)
|
||||
es6id: 14.5.15
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (static class expression method)
|
||||
es6id: 14.5.15
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
ClassDeclaration : class BindingIdentifier ClassTail
|
||||
|
||||
1. Let className be StringValue of BindingIdentifier.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (`const` statement)
|
||||
es6id: 13.3.1.4
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
LexicalBinding : BindingPattern Initializer
|
||||
|
||||
1. Let rhs be the result of evaluating Initializer.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (function declaration)
|
||||
es6id: 14.1.19
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
FunctionDeclaration :
|
||||
function BindingIdentifier ( FormalParameters ) { FunctionBody }
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (generator function declaration)
|
||||
es6id: 14.4.12
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
|
||||
|
||||
[...]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (`let` statement)
|
||||
es6id: 13.3.1.4
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
LexicalBinding : BindingPattern Initializer
|
||||
|
||||
1. Let rhs be the result of evaluating Initializer.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
description: SingleNameBinding with normal value iteration (`var` statement)
|
||||
es6id: 13.3.2.4
|
||||
flags: [generated]
|
||||
info: >
|
||||
info: |
|
||||
VariableDeclaration : BindingPattern Initializer
|
||||
|
||||
1. Let rhs be the result of evaluating Initializer.
|
||||
|
|
|
@ -20,7 +20,11 @@ def indent(text, prefix = ' '):
|
|||
else:
|
||||
lines = text.split('\n')
|
||||
|
||||
return prefix + ('\n' + prefix).join(lines)
|
||||
indented = map(
|
||||
lambda line: line if len(line) == 0 else prefix + line,
|
||||
lines)
|
||||
|
||||
return '\n'.join(indented)
|
||||
|
||||
class Template:
|
||||
def __init__(self, filename):
|
||||
|
@ -119,7 +123,7 @@ class Template:
|
|||
features += case_values['meta'].get('features', [])
|
||||
features += self.attribs['meta'].get('features', [])
|
||||
if len(features):
|
||||
lines += ['features: ' + yaml.dump(features)]
|
||||
lines += ['features: ' + yaml.dump(features).strip()]
|
||||
|
||||
flags = ['generated']
|
||||
flags += case_values['meta'].get('flags', [])
|
||||
|
@ -145,7 +149,7 @@ class Template:
|
|||
info.append(indent(case_values['meta']['info']))
|
||||
|
||||
if len(info):
|
||||
lines.append('info: >')
|
||||
lines.append('info: |')
|
||||
lines += info
|
||||
|
||||
lines.append('---*/')
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - tools/generation/test/fixtures/normal.case
|
||||
// - tools/generation/test/fixtures/normal/features.template
|
||||
/*---
|
||||
description: foobar (First template name)
|
||||
es6id: 1.2.3
|
||||
features: [f1]
|
||||
flags: [generated, a, b]
|
||||
includes: [foo.js]
|
||||
info: |
|
||||
case info
|
||||
---*/
|
||||
|
||||
'This is "teardown" code.';
|
|
@ -0,0 +1,36 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - tools/generation/test/fixtures/normal.case
|
||||
// - tools/generation/test/fixtures/normal/info-multiline-folding.template
|
||||
/*---
|
||||
description: foobar (First template name)
|
||||
es6id: 1.2.3
|
||||
flags: [generated, a, b]
|
||||
includes: [foo.js]
|
||||
info: |
|
||||
This is an "info" field with an
|
||||
|
||||
empty line
|
||||
Trailing white space in the template:
|
||||
should be preserved:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case info
|
||||
---*/
|
||||
|
||||
// Trailing white space in the test body:
|
||||
// should be preserved:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'This is "teardown" code.';
|
|
@ -6,7 +6,7 @@ description: foobar (Second template name)
|
|||
esid: sec-a-generic-id
|
||||
flags: [generated, a, b]
|
||||
includes: [foo.js, bar.js]
|
||||
info: >
|
||||
info: |
|
||||
template info
|
||||
|
||||
case info
|
||||
|
|
|
@ -6,7 +6,7 @@ description: foobar (First template name)
|
|||
es6id: 1.2.3
|
||||
flags: [generated, a, b]
|
||||
includes: [foo.js]
|
||||
info: >
|
||||
info: |
|
||||
case info
|
||||
---*/
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ description: foobar (First template name)
|
|||
es6id: 1.2.3
|
||||
flags: [generated, a, b, c, d]
|
||||
includes: [foo.js]
|
||||
info: >
|
||||
info: |
|
||||
template info
|
||||
|
||||
case info
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
name: First template name
|
||||
path: normal/features-
|
||||
es6id: 1.2.3
|
||||
features: [f1]
|
||||
---*/
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
name: First template name
|
||||
path: normal/info-multiline-folding-
|
||||
es6id: 1.2.3
|
||||
info: |
|
||||
This is an "info" field with an
|
||||
|
||||
empty line
|
||||
Trailing white space in the template:
|
||||
should be preserved:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---*/
|
||||
|
||||
// Trailing white space in the test body:
|
||||
// should be preserved:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue