From d6960125114c4da8d464f46028836e7ada1cdfe2 Mon Sep 17 00:00:00 2001 From: "monada-bot[bot]" Date: Sat, 23 Mar 2024 13:22:13 +0000 Subject: [PATCH] chore: self mutation (e2e-2of2.diff) Signed-off-by: monada-bot[bot] --- .../test_corpus/valid/baz.w_compile_tf-aws.md | 2 +- .../bring_local_dir.test.w_compile_tf-aws.md | 4 ++-- ...cal_normalization.test.w_compile_tf-aws.md | 24 +++++++++---------- ...ring_wing_library.test.w_compile_tf-aws.md | 4 ++-- .../valid/class.test.w_compile_tf-aws.md | 4 ++-- .../new_in_static.test.w_compile_tf-aws.md | 8 +++---- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md index d8aad8f03a3..eb0aa0c262c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/baz.w_compile_tf-aws.md @@ -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() { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local_dir.test.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local_dir.test.w_compile_tf-aws.md index 6c886da472f..a5ee4956211 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local_dir.test.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local_dir.test.w_compile_tf-aws.md @@ -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 ` @@ -263,7 +263,7 @@ class Widget extends $stdlib.std.Resource { compute() { return 42; } - static staticCompute() { + static staticCompute($scope, ) { return 1337; } static _toInflightType() { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.test.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.test.w_compile_tf-aws.md index 5790a08e16b..14fd3ab361e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.test.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local_normalization.test.w_compile_tf-aws.md @@ -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() { @@ -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() { @@ -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 ` @@ -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}); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_wing_library.test.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_wing_library.test.w_compile_tf-aws.md index f84aa366922..1408363f060 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_wing_library.test.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_wing_library.test.w_compile_tf-aws.md @@ -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")); } } @@ -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) { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/class.test.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/class.test.w_compile_tf-aws.md index d05d70e988d..f66f53ef89a 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/class.test.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/class.test.w_compile_tf-aws.md @@ -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() { @@ -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); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/new_in_static.test.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/new_in_static.test.w_compile_tf-aws.md index 812c64b86e6..a540575a056 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/new_in_static.test.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/new_in_static.test.w_compile_tf-aws.md @@ -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() { @@ -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")); } }