Backed out changeset bf800c62eeba (bug 1172641)

--HG--
extra : rebase_source : c34f5a4a4747e61e47f8367e8c66fc2ef57c2fff
This commit is contained in:
Carsten "Tomcat" Book 2015-06-11 16:35:09 +02:00
Родитель dbb95a17ef
Коммит 704da72051
5 изменённых файлов: 59 добавлений и 86 удалений

Просмотреть файл

@ -1,5 +1,3 @@
load(libdir + "class.js");
var JSMSG_ILLEGAL_CHARACTER = "illegal character";
var JSMSG_UNTERMINATED_STRING = "unterminated string literal";
@ -27,6 +25,7 @@ function test_eval(code) {
assertEq(caught, true);
}
function test(code) {
test_reflect(code);
test_reflect("'use strict'; " + code);
@ -469,18 +468,16 @@ test_no_fun_no_eval("export const a = 1, b = @");
test_no_fun_no_eval("export const a = 1, b = 2 @");
test_no_fun_no_eval("export const a = 1, b = 2; @");
if (classesEnabled()) {
test_no_fun_no_eval("export class @");
test_no_fun_no_eval("export class Foo @");
test_no_fun_no_eval("export class Foo { @");
test_no_fun_no_eval("export class Foo { constructor @");
test_no_fun_no_eval("export class Foo { constructor( @");
test_no_fun_no_eval("export class Foo { constructor() @");
test_no_fun_no_eval("export class Foo { constructor() { @");
test_no_fun_no_eval("export class Foo { constructor() {} @");
test_no_fun_no_eval("export class Foo { constructor() {} } @");
test_no_fun_no_eval("export class Foo { constructor() {} }; @");
}
test_no_fun_no_eval("export class @");
test_no_fun_no_eval("export class Foo @");
test_no_fun_no_eval("export class Foo { @");
test_no_fun_no_eval("export class Foo { constructor @");
test_no_fun_no_eval("export class Foo { constructor( @");
test_no_fun_no_eval("export class Foo { constructor() @");
test_no_fun_no_eval("export class Foo { constructor() { @");
test_no_fun_no_eval("export class Foo { constructor() {} @");
test_no_fun_no_eval("export class Foo { constructor() {} } @");
test_no_fun_no_eval("export class Foo { constructor() {} }; @");
test_no_fun_no_eval("export default @");
test_no_fun_no_eval("export default 1 @");
@ -499,27 +496,25 @@ test_no_fun_no_eval("export default function foo() { @");
test_no_fun_no_eval("export default function foo() {} @");
test_no_fun_no_eval("export default function foo() {}; @");
if (classesEnabled()) {
test_no_fun_no_eval("export default class @");
test_no_fun_no_eval("export default class { @");
test_no_fun_no_eval("export default class { constructor @");
test_no_fun_no_eval("export default class { constructor( @");
test_no_fun_no_eval("export default class { constructor() @");
test_no_fun_no_eval("export default class { constructor() { @");
test_no_fun_no_eval("export default class { constructor() {} @");
test_no_fun_no_eval("export default class { constructor() {} } @");
test_no_fun_no_eval("export default class { constructor() {} }; @");
test_no_fun_no_eval("export default class @");
test_no_fun_no_eval("export default class { @");
test_no_fun_no_eval("export default class { constructor @");
test_no_fun_no_eval("export default class { constructor( @");
test_no_fun_no_eval("export default class { constructor() @");
test_no_fun_no_eval("export default class { constructor() { @");
test_no_fun_no_eval("export default class { constructor() {} @");
test_no_fun_no_eval("export default class { constructor() {} } @");
test_no_fun_no_eval("export default class { constructor() {} }; @");
test_no_fun_no_eval("export default class Foo @");
test_no_fun_no_eval("export default class Foo { @");
test_no_fun_no_eval("export default class Foo { constructor @");
test_no_fun_no_eval("export default class Foo { constructor( @");
test_no_fun_no_eval("export default class Foo { constructor() @");
test_no_fun_no_eval("export default class Foo { constructor() { @");
test_no_fun_no_eval("export default class Foo { constructor() {} @");
test_no_fun_no_eval("export default class Foo { constructor() {} } @");
test_no_fun_no_eval("export default class Foo { constructor() {} }; @");
}
test_no_fun_no_eval("export default class Foo @");
test_no_fun_no_eval("export default class Foo { @");
test_no_fun_no_eval("export default class Foo { constructor @");
test_no_fun_no_eval("export default class Foo { constructor( @");
test_no_fun_no_eval("export default class Foo { constructor() @");
test_no_fun_no_eval("export default class Foo { constructor() { @");
test_no_fun_no_eval("export default class Foo { constructor() {} @");
test_no_fun_no_eval("export default class Foo { constructor() {} } @");
test_no_fun_no_eval("export default class Foo { constructor() {} }; @");
// import

Просмотреть файл

@ -1,6 +1,5 @@
load(libdir + "match.js");
load(libdir + "asserts.js");
load(libdir + "class.js");
var { Pattern, MatchError } = Match;
@ -203,18 +202,16 @@ program([
)
]).assert(Reflect.parse("export function f() {}"));
if (classesEnabled()) {
program([
exportDeclaration(
classDeclaration(
ident("Foo")
),
null,
null,
false
)
]).assert(Reflect.parse("export class Foo { constructor() {} }"));
}
program([
exportDeclaration(
classDeclaration(
ident("Foo")
),
null,
null,
false
)
]).assert(Reflect.parse("export class Foo { constructor() {} }"));
program([
exportDeclaration(
@ -295,29 +292,27 @@ program([
)
]).assert(Reflect.parse("export default function foo() {}"));
if (classesEnabled()) {
program([
exportDeclaration(
classDeclaration(
ident("*default*")
),
null,
null,
true
)
]).assert(Reflect.parse("export default class { constructor() {} }"));
program([
exportDeclaration(
classDeclaration(
ident("*default*")
),
null,
null,
true
)
]).assert(Reflect.parse("export default class { constructor() {} }"));
program([
exportDeclaration(
classDeclaration(
ident("Foo")
),
null,
null,
true
)
]).assert(Reflect.parse("export default class Foo { constructor() {} }"));
}
program([
exportDeclaration(
classDeclaration(
ident("Foo")
),
null,
null,
true
)
]).assert(Reflect.parse("export default class Foo { constructor() {} }"));
program([
exportDeclaration(

Просмотреть файл

@ -1,5 +1,3 @@
var test = `
// Just like newTargetDirectInvoke, except to prove it works in functions
// defined with method syntax as well. Note that methods, getters, and setters
// are not constructible.
@ -48,10 +46,7 @@ for (let i = 0; i < TEST_ITERATIONS; i++)
clInst.cl;
for (let i = 0; i < TEST_ITERATIONS; i++)
clInst.cl = 4;
`;
if (classesEnabled())
eval(test);
if (typeof reportCompare === "function")
reportCompare(0,0,"OK");

Просмотреть файл

@ -1,5 +1,3 @@
var test = `
class foo {
constructor() { }
@ -8,10 +6,6 @@ class foo {
}
}
assertEq(new foo().method()(), Object.prototype.toString);
`;
if (classesEnabled())
eval(test);
if (typeof reportCompare === "function")
reportCompare(0,0,"OK");

Просмотреть файл

@ -1,5 +1,3 @@
var test = `
class foo {
constructor() { }
@ -9,10 +7,6 @@ class foo {
}
assertEq(new foo().method()(), Object.prototype.toString);
`;
if (classesEnabled())
eval(test);
if (typeof reportCompare === "function")
reportCompare(0,0,"OK");