Skip to content

Commit

Permalink
Autogenerated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pzuraq authored and ptomato committed Oct 15, 2024
1 parent a242f1a commit f02d606
Show file tree
Hide file tree
Showing 557 changed files with 19,833 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-get.case
// - src/decorator/accessors/error/private/instance/cls-expr.template
/*---
description: Accessor decorator cannot return invalid getter (private acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-private]
flags: [generated]
---*/


function dec() {
return {
get: 123
};
}


function evaluate() {
var C = class {
@dec

accessor #element;
}
}

assert.throws(TypeError, evaluate);

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-init.case
// - src/decorator/accessors/error/private/instance/cls-expr.template
/*---
description: Accessor decorator cannot return invalid init (private acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-private]
flags: [generated]
---*/


function dec() {
return {
init: 123
};
}


function evaluate() {
var C = class {
@dec

accessor #element;
}
}

assert.throws(TypeError, evaluate);

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-set.case
// - src/decorator/accessors/error/private/instance/cls-expr.template
/*---
description: Accessor decorator cannot return invalid setter (private acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-private]
flags: [generated]
---*/


function dec() {
return {
set: 123
};
}


function evaluate() {
var C = class {
@dec

accessor #element;
}
}

assert.throws(TypeError, evaluate);

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return.case
// - src/decorator/accessors/error/private/instance/cls-expr.template
/*---
description: Accessor decorator cannot return invalid init (private acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-private]
flags: [generated]
---*/


function dec() {
return 123;
}


function evaluate() {
var C = class {
@dec

accessor #element;
}
}

assert.throws(TypeError, evaluate);

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-get.case
// - src/decorator/accessors/error/private/static/cls-expr.template
/*---
description: Accessor decorator cannot return invalid getter (private static acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-static-fields-private]
flags: [generated]
---*/


function dec() {
return {
get: 123
};
}


function evaluate() {
var C = class {
@dec

static accessor #element;
}
}

assert.throws(TypeError, evaluate);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-init.case
// - src/decorator/accessors/error/private/static/cls-expr.template
/*---
description: Accessor decorator cannot return invalid init (private static acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-static-fields-private]
flags: [generated]
---*/


function dec() {
return {
init: 123
};
}


function evaluate() {
var C = class {
@dec

static accessor #element;
}
}

assert.throws(TypeError, evaluate);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-set.case
// - src/decorator/accessors/error/private/static/cls-expr.template
/*---
description: Accessor decorator cannot return invalid setter (private static acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-static-fields-private]
flags: [generated]
---*/


function dec() {
return {
set: 123
};
}


function evaluate() {
var C = class {
@dec

static accessor #element;
}
}

assert.throws(TypeError, evaluate);
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return.case
// - src/decorator/accessors/error/private/static/cls-expr.template
/*---
description: Accessor decorator cannot return invalid init (private static acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-static-fields-private]
flags: [generated]
---*/


function dec() {
return 123;
}


function evaluate() {
var C = class {
@dec

static accessor #element;
}
}

assert.throws(TypeError, evaluate);
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-get.case
// - src/decorator/accessors/error/public/instance/cls-expr.template
/*---
description: Accessor decorator cannot return invalid getter (public acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-public]
flags: [generated]
---*/


function dec() {
return {
get: 123
};
}


function evaluate() {
var C = class {
@dec

accessor element;
}
}

assert.throws(TypeError, evaluate);

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-init.case
// - src/decorator/accessors/error/public/instance/cls-expr.template
/*---
description: Accessor decorator cannot return invalid init (public acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-public]
flags: [generated]
---*/


function dec() {
return {
init: 123
};
}


function evaluate() {
var C = class {
@dec

accessor element;
}
}

assert.throws(TypeError, evaluate);

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return-set.case
// - src/decorator/accessors/error/public/instance/cls-expr.template
/*---
description: Accessor decorator cannot return invalid setter (public acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-public]
flags: [generated]
---*/


function dec() {
return {
set: 123
};
}


function evaluate() {
var C = class {
@dec

accessor element;
}
}

assert.throws(TypeError, evaluate);

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-invalid-return.case
// - src/decorator/accessors/error/public/instance/cls-expr.template
/*---
description: Accessor decorator cannot return invalid init (public acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-public]
flags: [generated]
---*/


function dec() {
return 123;
}


function evaluate() {
var C = class {
@dec

accessor element;
}
}

assert.throws(TypeError, evaluate);

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// This file was procedurally generated from the following sources:
// - src/decorator/accessor-deco-returns-get.case
// - src/decorator/accessors/standard/private/instance/cls-expr.template
/*---
description: Accessor decorator can return a new getter (private acessor decorator behavior in class expression)
esid: prod-FieldDefinition
features: [decorators, class, class-fields-private]
flags: [generated]
---*/


function dec({ get }) {
return {
get() {
assert.sameValue(get.call(this), undefined);
return 123;
}
};
}


var C = class {
@dec

accessor #element;

getElement() {
return this.#element;
}

setElement(value) {
this.#element = value;
}
}

var classOrInstance = new C();

assert.sameValue(classOrInstance.getElement(), 123);
Loading

0 comments on commit f02d606

Please sign in to comment.