Skip to content

Commit

Permalink
chore: self mutation (e2e-2of2.diff)
Browse files Browse the repository at this point in the history
Signed-off-by: monada-bot[bot] <[email protected]>
  • Loading branch information
monadabot committed Mar 23, 2024
1 parent 7fe09d3 commit d696012
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Baz extends $stdlib.std.Resource {
constructor($scope, $id, ) {
super($scope, $id);
}
static baz() {
static baz($scope, ) {
return "baz";
}
static _toInflightType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Foo extends $stdlib.std.Resource {
return "foo";
}
checkWidget(widget) {
return ((widget.compute()) + (blah.Widget.staticCompute()));
return ((widget.compute()) + (blah.Widget.staticCompute(this, )));
}
static _toInflightType() {
return `
Expand Down Expand Up @@ -263,7 +263,7 @@ class Widget extends $stdlib.std.Resource {
compute() {
return 42;
}
static staticCompute() {
static staticCompute($scope, ) {
return 1337;
}
static _toInflightType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Bar extends $stdlib.std.Resource {
constructor($scope, $id, ) {
super($scope, $id);
}
static bar() {
static bar($scope, ) {
return "bar";
}
static _toInflightType() {
Expand Down Expand Up @@ -112,7 +112,7 @@ class Baz extends $stdlib.std.Resource {
constructor($scope, $id, ) {
super($scope, $id);
}
static baz() {
static baz($scope, ) {
return "baz";
}
static _toInflightType() {
Expand Down Expand Up @@ -155,14 +155,14 @@ class Foo extends $stdlib.std.Resource {
constructor($scope, $id, ) {
super($scope, $id);
}
static foo() {
static foo($scope, ) {
return "foo";
}
static bar() {
return (bar.Bar.bar());
static bar($scope, ) {
return (bar.Bar.bar($scope, ));
}
static baz() {
return (baz.Baz.baz());
static baz($scope, ) {
return (baz.Baz.baz($scope, ));
}
static _toInflightType() {
return `
Expand Down Expand Up @@ -207,11 +207,11 @@ const baz = require("./preflight.baz-2.js");
class $Root extends $stdlib.std.Resource {
constructor($scope, $id) {
super($scope, $id);
$helpers.assert($helpers.eq((foo.Foo.foo()), "foo"), "foo.Foo.foo() == \"foo\"");
$helpers.assert($helpers.eq((foo.Foo.bar()), "bar"), "foo.Foo.bar() == \"bar\"");
$helpers.assert($helpers.eq((foo.Foo.baz()), "baz"), "foo.Foo.baz() == \"baz\"");
$helpers.assert($helpers.eq((bar.Bar.bar()), "bar"), "bar.Bar.bar() == \"bar\"");
$helpers.assert($helpers.eq((baz.Baz.baz()), "baz"), "baz.Baz.baz() == \"baz\"");
$helpers.assert($helpers.eq((foo.Foo.foo(this, )), "foo"), "foo.Foo.foo() == \"foo\"");
$helpers.assert($helpers.eq((foo.Foo.bar(this, )), "bar"), "foo.Foo.bar() == \"bar\"");
$helpers.assert($helpers.eq((foo.Foo.baz(this, )), "baz"), "foo.Foo.baz() == \"baz\"");
$helpers.assert($helpers.eq((bar.Bar.bar(this, )), "bar"), "bar.Bar.bar() == \"bar\"");
$helpers.assert($helpers.eq((baz.Baz.baz(this, )), "baz"), "baz.Baz.baz() == \"baz\"");
}
}
const $PlatformManager = new $stdlib.platform.PlatformManager({platformPaths: $platforms});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class $Root extends $stdlib.std.Resource {
const fave_num = fixture.FavoriteNumbers.SEVEN;
const fave_num2 = testfixture.FavoriteNumbers.SEVEN;
const fave_num3 = testfixture2.FavoriteNumbers.SEVEN;
$helpers.assert($helpers.eq((fixture.Store.makeKey("hello")), "data/hello.json"), "fixture.Store.makeKey(\"hello\") == \"data/hello.json\"");
$helpers.assert($helpers.eq((fixture.Store.makeKey(this, "hello")), "data/hello.json"), "fixture.Store.makeKey(\"hello\") == \"data/hello.json\"");
this.node.root.new("@winglang/sdk.std.Test", std.Test, this, "test:makeKeyInflight", new $Closure1(this, "$Closure1"));
}
}
Expand All @@ -193,7 +193,7 @@ class Store extends $stdlib.std.Resource {
this.data = this.node.root.new("@winglang/sdk.cloud.Bucket", cloud.Bucket, this, "Bucket");
this.handlers = [];
}
static makeKey(name) {
static makeKey($scope, name) {
return (require("@winglibs/testfixture/util.js")["makeKey"])(name)
}
onSet(handler) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ class $Root extends $stdlib.std.Resource {
constructor($scope, $id, ) {
super($scope, $id);
}
static m() {
static m($scope, ) {
return 1;
}
static _toInflightType() {
Expand Down Expand Up @@ -993,7 +993,7 @@ class $Root extends $stdlib.std.Resource {
const c3 = new C3(this, "C3", 1, 2);
$helpers.assert($helpers.eq(c3.x, 1), "c3.x == 1");
$helpers.assert($helpers.eq(c3.y, 2), "c3.y == 2");
$helpers.assert($helpers.eq((C4.m()), 1), "C4.m() == 1");
$helpers.assert($helpers.eq((C4.m(this, )), 1), "C4.m() == 1");
const c5 = new C5(this, "C5");
this.node.root.new("@winglang/sdk.std.Test", std.Test, this, "test:access inflight field", new $Closure1(this, "$Closure1"));
const student = new PaidStudent(this, "PaidStudent", "Tom", "MySpace", 38);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ class $Root extends $stdlib.std.Resource {
constructor($scope, $id, ) {
super($scope, $id);
}
static createBucket(scope) {
static createBucket($scope, scope) {
return ($scope => $scope.node.root.new("@winglang/sdk.cloud.Bucket", cloud.Bucket, $scope, "Bucket"))(scope);
}
static createMyClass(scope) {
static createMyClass($scope, scope) {
return new MyClass(scope, "MyClass");
}
static _toInflightType() {
Expand Down Expand Up @@ -177,9 +177,9 @@ class $Root extends $stdlib.std.Resource {
this.node.root.new("@winglang/sdk.cloud.Bucket", cloud.Bucket, this, "b2");
}
const scope = this.node.root.new("constructs.Construct", c.Construct, this, "Construct");
const bucket = (MyClass.createBucket(scope));
const bucket = (MyClass.createBucket(this, scope));
const bucket2 = (createBucket());
const my = (MyClass.createMyClass(scope));
const my = (MyClass.createMyClass(this, scope));
this.node.root.new("@winglang/sdk.std.Test", std.Test, this, "test:play with bucket", new $Closure1(this, "$Closure1"));
}
}
Expand Down

0 comments on commit d696012

Please sign in to comment.