From f93cfbd05e946108354f2a9b2fe999f542276202 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Wed, 8 Oct 2025 19:22:56 -0500 Subject: [PATCH] Import most of the forkphorus test suite --- test/fixtures/execute/README.md | 2 + .../execute/forkphorus-105-contains.sb3 | Bin 0 -> 2050 bytes test/fixtures/execute/forkphorus-112.sb3 | Bin 0 -> 2120 bytes test/fixtures/execute/forkphorus-263-NaN.sb3 | Bin 0 -> 2356 bytes .../execute/forkphorus-264-setCostume.sb3 | Bin 0 -> 3219 bytes ...forkphorus-285-variable-id-name-desync.sb3 | Bin 0 -> 2118 bytes test/fixtures/execute/forkphorus-56-NaN.sb3 | Bin 0 -> 2228 bytes .../execute/forkphorus-58-list-reference.sb3 | Bin 0 -> 3208 bytes .../fixtures/execute/forkphorus-66-insert.sb3 | Bin 0 -> 2397 bytes test/fixtures/execute/forkphorus-70.sb3 | Bin 0 -> 2014 bytes .../forkphorus-and-or-not-cast-to-boolean.sb3 | Bin 0 -> 1787 bytes .../forkphorus-befunge-eratosthenes.sb3 | Bin 0 -> 17564 bytes ...orkphorus-broadcast-self-restart-delay.sb3 | Bin 0 -> 2205 bytes ...orus-cannot-forceQueue-after-broadcast.sb3 | Bin 0 -> 2348 bytes .../execute/forkphorus-change-size-NaN.sb3 | Bin 0 -> 1550 bytes .../forkphorus-costume-name-infinity-nan.sb3 | Bin 0 -> 1632 bytes .../execute/forkphorus-for-each-in.sb3 | Bin 0 -> 3430 bytes .../forkphorus-glide-negative-time.sb3 | Bin 0 -> 1674 bytes .../execute/forkphorus-glide-xy-NaN.sb3 | Bin 0 -> 2233 bytes .../execute/forkphorus-mathop-NaN.sb3 | Bin 0 -> 2008 bytes .../execute/forkphorus-negative-zero.sb3 | Bin 0 -> 2045 bytes .../forkphorus-operators-output-NaN.sb3 | Bin 0 -> 1652 bytes .../fixtures/execute/forkphorus-operators.sb3 | Bin 0 -> 8340 bytes ...reserve-order-after-stop-other-scripts.sb3 | Bin 0 -> 3119 bytes .../forkphorus-procedure-definition-order.sb3 | Bin 0 -> 1752 bytes ...phorus-run-blocks-after-self-broadcast.sb3 | Bin 0 -> 2103 bytes .../forkphorus-scripts-run-after-stop-all.sb3 | Bin 0 -> 2485 bytes ...orkphorus-stop-other-scripts-in-sprite.sb3 | Bin 0 -> 2494 bytes .../execute/forkphorus-string-functions.sb3 | Bin 0 -> 10957 bytes test/fixtures/execute/forkphorus-tangent.sb3 | Bin 0 -> 2164 bytes .../forkphorus-105-contains.sb3.tw-snapshot | 45 ++ .../forkphorus-112.sb3.tw-snapshot | 45 ++ .../forkphorus-263-NaN.sb3.tw-snapshot | 48 ++ .../forkphorus-264-setCostume.sb3.tw-snapshot | 75 +++ ...85-variable-id-name-desync.sb3.tw-snapshot | 44 ++ .../forkphorus-56-NaN.sb3.tw-snapshot | 47 ++ ...rkphorus-58-list-reference.sb3.tw-snapshot | 60 +++ .../forkphorus-66-insert.sb3.tw-snapshot | 54 +++ .../forkphorus-70.sb3.tw-snapshot | 43 ++ ...and-or-not-cast-to-boolean.sb3.tw-snapshot | 27 ++ ...horus-befunge-eratosthenes.sb3.tw-snapshot | 437 +++++++++++++++++ ...oadcast-self-restart-delay.sb3.tw-snapshot | 61 +++ ...forceQueue-after-broadcast.sb3.tw-snapshot | 37 ++ ...forkphorus-change-size-NaN.sb3.tw-snapshot | 18 + ...-costume-name-infinity-nan.sb3.tw-snapshot | 35 ++ .../forkphorus-for-each-in.sb3.tw-snapshot | 134 ++++++ ...phorus-glide-negative-time.sb3.tw-snapshot | 43 ++ .../forkphorus-glide-xy-NaN.sb3.tw-snapshot | 19 + .../forkphorus-mathop-NaN.sb3.tw-snapshot | 37 ++ .../forkphorus-negative-zero.sb3.tw-snapshot | 44 ++ ...horus-operators-output-NaN.sb3.tw-snapshot | 27 ++ .../forkphorus-operators.sb3.tw-snapshot | 165 +++++++ ...r-after-stop-other-scripts.sb3.tw-snapshot | 81 ++++ ...procedure-definition-order.sb3.tw-snapshot | 28 ++ ...locks-after-self-broadcast.sb3.tw-snapshot | 56 +++ ...scripts-run-after-stop-all.sb3.tw-snapshot | 93 ++++ ...op-other-scripts-in-sprite.sb3.tw-snapshot | 36 ++ ...orkphorus-string-functions.sb3.tw-snapshot | 276 +++++++++++ .../forkphorus-tangent.sb3.tw-snapshot | 56 +++ .../tw-loop-custom-reporter.sb3.tw-snapshot | 27 -- .../forkphorus-105-contains.sb3.tw-snapshot | 45 ++ .../warp-timer/forkphorus-112.sb3.tw-snapshot | 45 ++ .../forkphorus-263-NaN.sb3.tw-snapshot | 48 ++ .../forkphorus-264-setCostume.sb3.tw-snapshot | 75 +++ ...85-variable-id-name-desync.sb3.tw-snapshot | 44 ++ .../forkphorus-56-NaN.sb3.tw-snapshot | 47 ++ ...rkphorus-58-list-reference.sb3.tw-snapshot | 60 +++ .../forkphorus-66-insert.sb3.tw-snapshot | 54 +++ .../warp-timer/forkphorus-70.sb3.tw-snapshot | 43 ++ ...and-or-not-cast-to-boolean.sb3.tw-snapshot | 27 ++ ...horus-befunge-eratosthenes.sb3.tw-snapshot | 442 ++++++++++++++++++ ...oadcast-self-restart-delay.sb3.tw-snapshot | 61 +++ ...forceQueue-after-broadcast.sb3.tw-snapshot | 37 ++ ...forkphorus-change-size-NaN.sb3.tw-snapshot | 18 + ...-costume-name-infinity-nan.sb3.tw-snapshot | 35 ++ .../forkphorus-for-each-in.sb3.tw-snapshot | 134 ++++++ ...phorus-glide-negative-time.sb3.tw-snapshot | 43 ++ .../forkphorus-glide-xy-NaN.sb3.tw-snapshot | 19 + .../forkphorus-mathop-NaN.sb3.tw-snapshot | 37 ++ .../forkphorus-negative-zero.sb3.tw-snapshot | 44 ++ ...horus-operators-output-NaN.sb3.tw-snapshot | 27 ++ .../forkphorus-operators.sb3.tw-snapshot | 165 +++++++ ...r-after-stop-other-scripts.sb3.tw-snapshot | 81 ++++ ...procedure-definition-order.sb3.tw-snapshot | 28 ++ ...locks-after-self-broadcast.sb3.tw-snapshot | 56 +++ ...scripts-run-after-stop-all.sb3.tw-snapshot | 93 ++++ ...op-other-scripts-in-sprite.sb3.tw-snapshot | 36 ++ ...orkphorus-string-functions.sb3.tw-snapshot | 282 +++++++++++ .../forkphorus-tangent.sb3.tw-snapshot | 56 +++ .../tw-loop-custom-reporter.sb3.tw-snapshot | 27 -- 90 files changed, 4355 insertions(+), 54 deletions(-) create mode 100644 test/fixtures/execute/forkphorus-105-contains.sb3 create mode 100644 test/fixtures/execute/forkphorus-112.sb3 create mode 100644 test/fixtures/execute/forkphorus-263-NaN.sb3 create mode 100644 test/fixtures/execute/forkphorus-264-setCostume.sb3 create mode 100644 test/fixtures/execute/forkphorus-285-variable-id-name-desync.sb3 create mode 100644 test/fixtures/execute/forkphorus-56-NaN.sb3 create mode 100644 test/fixtures/execute/forkphorus-58-list-reference.sb3 create mode 100644 test/fixtures/execute/forkphorus-66-insert.sb3 create mode 100644 test/fixtures/execute/forkphorus-70.sb3 create mode 100644 test/fixtures/execute/forkphorus-and-or-not-cast-to-boolean.sb3 create mode 100644 test/fixtures/execute/forkphorus-befunge-eratosthenes.sb3 create mode 100644 test/fixtures/execute/forkphorus-broadcast-self-restart-delay.sb3 create mode 100644 test/fixtures/execute/forkphorus-cannot-forceQueue-after-broadcast.sb3 create mode 100644 test/fixtures/execute/forkphorus-change-size-NaN.sb3 create mode 100644 test/fixtures/execute/forkphorus-costume-name-infinity-nan.sb3 create mode 100644 test/fixtures/execute/forkphorus-for-each-in.sb3 create mode 100644 test/fixtures/execute/forkphorus-glide-negative-time.sb3 create mode 100644 test/fixtures/execute/forkphorus-glide-xy-NaN.sb3 create mode 100644 test/fixtures/execute/forkphorus-mathop-NaN.sb3 create mode 100644 test/fixtures/execute/forkphorus-negative-zero.sb3 create mode 100644 test/fixtures/execute/forkphorus-operators-output-NaN.sb3 create mode 100644 test/fixtures/execute/forkphorus-operators.sb3 create mode 100644 test/fixtures/execute/forkphorus-preserve-order-after-stop-other-scripts.sb3 create mode 100644 test/fixtures/execute/forkphorus-procedure-definition-order.sb3 create mode 100644 test/fixtures/execute/forkphorus-run-blocks-after-self-broadcast.sb3 create mode 100644 test/fixtures/execute/forkphorus-scripts-run-after-stop-all.sb3 create mode 100644 test/fixtures/execute/forkphorus-stop-other-scripts-in-sprite.sb3 create mode 100644 test/fixtures/execute/forkphorus-string-functions.sb3 create mode 100644 test/fixtures/execute/forkphorus-tangent.sb3 create mode 100644 test/snapshot/__snapshots__/forkphorus-105-contains.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-112.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-263-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-264-setCostume.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-285-variable-id-name-desync.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-56-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-58-list-reference.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-66-insert.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-70.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-and-or-not-cast-to-boolean.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-befunge-eratosthenes.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-broadcast-self-restart-delay.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-cannot-forceQueue-after-broadcast.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-change-size-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-costume-name-infinity-nan.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-for-each-in.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-glide-negative-time.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-glide-xy-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-mathop-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-negative-zero.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-operators-output-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-operators.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-preserve-order-after-stop-other-scripts.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-procedure-definition-order.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-run-blocks-after-self-broadcast.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-scripts-run-after-stop-all.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-stop-other-scripts-in-sprite.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-string-functions.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/forkphorus-tangent.sb3.tw-snapshot delete mode 100644 test/snapshot/__snapshots__/tw-loop-custom-reporter.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-105-contains.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-112.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-263-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-264-setCostume.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-285-variable-id-name-desync.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-56-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-58-list-reference.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-66-insert.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-70.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-and-or-not-cast-to-boolean.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-befunge-eratosthenes.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-broadcast-self-restart-delay.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-cannot-forceQueue-after-broadcast.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-change-size-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-costume-name-infinity-nan.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-for-each-in.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-glide-negative-time.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-glide-xy-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-mathop-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-negative-zero.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-operators-output-NaN.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-operators.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-preserve-order-after-stop-other-scripts.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-procedure-definition-order.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-run-blocks-after-self-broadcast.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-scripts-run-after-stop-all.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-stop-other-scripts-in-sprite.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-string-functions.sb3.tw-snapshot create mode 100644 test/snapshot/__snapshots__/warp-timer/forkphorus-tangent.sb3.tw-snapshot delete mode 100644 test/snapshot/__snapshots__/warp-timer/tw-loop-custom-reporter.sb3.tw-snapshot diff --git a/test/fixtures/execute/README.md b/test/fixtures/execute/README.md index 140d6a95f6e..08b8ed34951 100644 --- a/test/fixtures/execute/README.md +++ b/test/fixtures/execute/README.md @@ -1,3 +1,5 @@ Tests in this folder are run in scratch by integration/execute.js. The tests can SAY test messages that map to tap methods. Read integration/execute.js for more. Tests whose names start with `tw-` are added by TurboWarp. Some of these tests are based on real projects from the scratch.mit.edu website, in which case their filename contains the original project ID and additional credits are within the project's scripts. We believe our use of these projects is fair use as the projects have been sufficiently modified and stripped down such that the project found here bears not even a slight resemblance to the original project. + +Tests whose names start with `forkphorus-` were imported from https://github.com/forkphorus/forkphorus/tree/master/tests. There is a fair bit of test case sharing between forkphorus and TurboWarp. diff --git a/test/fixtures/execute/forkphorus-105-contains.sb3 b/test/fixtures/execute/forkphorus-105-contains.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..57395526bd4dab9c3b3f0a6a784bcf6219d7b696 GIT binary patch literal 2050 zcma)-c{CJ?7sqE9WXKYk$iDP!m1T&OhsH9-*eX(DFhiCMW=wcx9mbYo{Fv;FjFQO~ zCKMhTrpH((S(05z^(JJ0et-Sm@165I=XdY2pDp7~JPe}3@DUCFI46Doo?RGBt<5qB=r!~EAc&pjQQFjFdV3^*Jk+<^m~SQ3NOKIt)o-FFpsC#?o#>Tl25Swo9)w?-+y z++{?7k z?xr_sNt_zzWGg7;coz|o_L(T)0`_hZzS{UP6um+WHzr(w@Jhcw{WJ*K5*Mf>h!V*P z42I=~yIVAv^O{sB{OtLzQ7Gx%ucx!_JsrkSOU@ebT(;f!ruX0(5KPeW`o+6KEyhYI zS%ZMaAmLIkW4gj>f~h?I{3w-o#zMng9hHfwt*_!p4RhMgz`JCKOdH zs3MeDNNGu^q^qF1Vf&`K1y5>k-0wvl9qygA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$*dA>aUMV{)5z98c*+xK?8NewQQ=@rZM>V3)!J7hluC)G9W!#(-DAok-b>zu+n z^h2&sPSXUEHgaSeSLYUK3glGmyaF17OPyy_ome!N+#5sEKSjC4dKV=RUjDTx5pF#n zycB`*uGDGbs9e!)NhFZRyQJyX?#)`!0Oa*-H$7QgOm0E=y|>N#oXVOqf^rX^JHIcZ zN|tsr6~dRE|Fe7CgWKf8dr!wpxvM36x7J_6s%5Y0Z_EACD!1UoubV zuepKm2=K^(l^bOUe1@QFt0oh|-Rs>Jla%Wk7czNC$k+1Uk(zuKRO%b-Gl3(tBlvfo z>-A*mtWv^35>+DdoV#G$4soG{wEwPV9=bUO6k@XCuHeIPS2H~$H`wv|+BW~;v((z? zK0oLK(>8}DcMRJQeHd_Q8@WQe5W5hv>a<%zCJMD>gK{Tw+FVqi_B&hI9$qJ`#H@YZ zJUV$e3A=N9q$BR%$rRaO7Dxivn8N-{PYXx}1N?tie!f2c yIREtMe=`5n;omgOxy%1As{FI#pCb6XBPZ2=lZ2iYCFm~}`FVUg&zaPJ-Tnu;0+%-c literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-66-insert.sb3 b/test/fixtures/execute/forkphorus-66-insert.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..b9b3011a6cc1c245d262c1854a2c2ed834980668 GIT binary patch literal 2397 zcma)8XHXM}5>5yZLEtC>l@fsiq$5SDv;d(O0VyIa1O$;D@aRZD=_YiDpok%2Adg-Q zy$K>s9yOrBqX<%@h)6ITcYof!n|U*DcXoDmXTROq{j;BqIf#)J005i=_%{#QtXzI@ zt_=(TL|z2|*v_)Sp+R@Oy-@OZ!-4`AZ=DarsdLh0G`?w0F0@vLd+$Z-Ll>Y`FvG=^67m57AtErAk{$ZPSI`T+zpd`|6L#uB)up9UZb-M>D_y&fK&{^Acra zpvRsOIK#!M3v?f;#}nZy%CEWLA7xZ2EfCfEn#6X{tygU?y~1uQaVzgLP9TBPIV$gV zDqHMK;*bW9Q{lT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TMtF8hpnPzUYqz~og2&){It>X?%mRTCeS2}BQb4fq{J*!?RA>ZNi z@O~=F6mOrAadSYjyGi#d`bF&U$tcSwou|KUe~mRIDXk432R^K-qt~VUHVlxx-^T9M z*U%QcY^XJN+&`Z z^eZFzuE+gYh}_h(%6T&QiEY=;;t5N-88WW3b#AkNGQWIS99dtGevZu66?&&W{mEPv zHh;uTd(`L6kNP1Zp>+pwX>Pg2M74FW(9+?wc@7!QRj1h8 znxBe~Ndy#ASSrv|g%6!H@>^H6)KKc;ajp>B0M)&{fv$G+%{`yJW8|(do3{Ci8TZQe zJiT&DkM^JeUKk}tMcms!e8#DXRVYH};!Z**Ce=E^h6pg2i^4>Ksmh6-C{M}P!m|w< zIvm_&K+mvDYAcOt@t}=^{)`iY=Lmo(77cR^*Cy4CDMgtL{%-G33{&4e#Hqn_upx~D zExXK#clUm=`L8dZGRg_eIs5K!&rIyhypT$Y*A!KdSFb56`XGIL5K2l)S5>^PdV5{- zMyjiL%7;bV39vNhKnp__qSI!Y!F?o^p6904<2(&!N%s9+#Bs{ZtpZCQ#iAgA8K48t z^Zk0*kT@(<+c}vx@mgR_!{k&EYS&pLr=~2?a(GhRI62?fFUdq|7qzOx_FQ_{_Fk{? zi=lGd)6>K{l7B7v<@toezKgf_KY@y%(4dy^C94u9W@9xvqmIU>ig*?eiwj%d&Eo+! x=0FAr;D3{sv(5e{f2T74ME>(2|ADQZk)i+RJT~S`%zvU7&NSo9lh6Gb{Q)H0U=;uW literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-70.sb3 b/test/fixtures/execute/forkphorus-70.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..e65f034bca09ee8516f2f93deb7d4976e8cb77a2 GIT binary patch literal 2014 zcma)-cQhM{7snHu+Cr&N{5({Y7*QiUQUoCg+6K?45j7Gu(u!9rM$J&8Nv#?+ix@Sk zN^P~$ms(YdwpvP2uSShNzrTL(_s;p9^Sk%lbI-l!e*d`Ne?GP-RyH000Kf(C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1>R%141PA(%O zRugVx6C+k`GZsb%dy7aVMJZ$i{J#z(Bg;sOs{jB{y#N5@3>+*t$Iu<`2LSLfUq)O+ z%_IACi3I|{j1*A!#06?!MnQ+^oPY!XgnM65z(oUakeI;{JS;Bw8X5|Gj9EAc0*pb@ z2Y>ZkfM3!QZ#X-y^}_W8~k{!QT_*-)n-uS4)2{ z4F6s-|Ghi-d*Af;7V+=R^Zx@+z+GP<>G|66fd{;X0LVxvir0vK4f@}yk?S+P=K!$w zFZqiaF=gX4=j3E&Gc#f3VKZelVP)arHf1w2V&-6B<}o*8{@2t90L*s)ApeaTacV~X z3kT)jsF76@qX0;3Trkn$2Y`=;wITs)7+fT@TvWfAySN)UnE{MF8I5hfeKR%nWHfQ| zba45`Xk}+)Va5n%Us%~C>`lIznmLuj`k#Rf{|_G2&7yCgLjwSR$zL^dm~gWgv4Pz% zGUhfm<}?`wtIJ7g>-20HlGs zPrGrRw2=m!A^f8d0Otg79`0X(`RiYyHvj@008p@hg?}jiJL~?@DF3=${(I>D(INi1 zPyEC8|1LU8FlYLoZixTv{J$&y*Uj?ZQ1^cuC5|8nR$vP7zKy1W2ekhm111C{CgA`4 zUJY<1|LOCe-?E`3_dhNFHIx1yX42sIbo^I%^?yeE=LzUP5KRRBYtzv`BmVP*@E?ej bg8#MYK}ingFP0ww4gNBN`FRbozf%7L@R|+Z literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-broadcast-self-restart-delay.sb3 b/test/fixtures/execute/forkphorus-broadcast-self-restart-delay.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..41dd6ec091d911c47fb74fd85108866024eaeff4 GIT binary patch literal 2205 zcma)8X*3iJ7ase*)r>8BgA!pZGb5Ef%_Ngu34ncD-~@O!_oG0psfT!W z0ANlE0N_2@`ugEKFs=a?J^XP#bo+;v(=fp!B`at?ZI?M|n+1XOA;_|t@^Bd%)Tm%A zdTk_xrXXn&ruRAztGqb8YR@R@9S)meA!*8k<~RzXeT>h-Zqn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wbw}AkYc|q zgry)zNOY!{MpJR%k-9w2*eFoS2E9f)aA8woz6pYi`qE%JM=y(inBa-!HGGogKqx|= zO+v?x1?7t?lCkGbK7H19?ZBn$_jo&J<)bLt1#qdZedx9cO_A_$YMvaVKFeQx;k7<3!lkvI%QZPbIfeSo=i$X(#Q1FJ8IS`%iaXmEgQ=5fI`1 z&OgK?9v6<-+75GT#2I@}mXmn(R)swdj&`&N;k}#a5%spcS%(N=J4n*zS>x!>9<(>n z@-~{cvq_+Sq)_%Ru45qbg^hWyB>0uDX7tmz)Pu-y!i`W`YUFy@kn)QQyZsw2+Qk}1 z-<~hCY@3~S&S~FDwss}Fz79;}Q39YFguk}QP+vlW9x>It53kFNLc3sQ>b5ha8j7cA z%i2CE={k14jjIp%O6@MWjUVqhjjN)NOw2&Q{}%s~C;u(}ZUz2{{3kd6f#sf$no##FEz>e?*IS* literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-cannot-forceQueue-after-broadcast.sb3 b/test/fixtures/execute/forkphorus-cannot-forceQueue-after-broadcast.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..14e9b8d6e82c3a3525fbd87a67618d195a502712 GIT binary patch literal 2348 zcma);S5OmZ7lso;H`1F6f*`%b0HLaMK?qH%U_eM)L?CnpL69y|qzKXpArz4;B~qjd zQda^-M7n^0=u%>67Ra*y&F(t$&+PfmneXa7Gw;Rw%&~=om^lFe06V}tBg-+F6k9t0 z0sxR;0N}U*{((4e3@RAn9fb4i$hj7@q$v>1urQrV4DBa2p&H_H-%9!E04JM`POH z8w4TWRZ>EDFPruDyYwW1Y8F$Tr`vLpsHgAEn%E8F8dIK#-)pt;skx!k=Tqzo*Cr}}gu?7)pM?9j-<2w6xcAJrTg=FKm*`5IWG=1~y9V<0 z^p`C2$zPnHj^EwziY67MbOxK9-KRj}`qcbX{C$Q40+IN(He-AsP`=K&us&cefmjy- zTE_Jtz-*hCfzzp#9Y?!pgpmvDYhd^;=jrsYuCrKC2lL2bq20lZ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n&Qgg_?0Ivjl5^^(7Abc}8UJ-t z4^*#IJmlQ0Ralz*JYlu=_LiD=2RyEPir)A7i=|YZ_8Oi)>MOWfbf)iT3_!_n9p?lX zCj&FuDIit>;^Y(~LsLVO6a!OZ!?cvNv?L=VBLkCEgVbcx)D#PoM7`p&^ju$WzGelH zJJns+x3eEvXL4wfr~d`vEnY1lM-QyNaQk}Hbl)_?nfcP!8N-AZectSJQq`%*HnLT; z$uw`nmdjUXmVAsg&IhkkQe+1$VEqqrvqJ$iX)uKdwR zFHJKh{w3!o$IknIVACqCjoUc_e<$3%lyuU&B}H_mm}=9-GLtR0GfH2@-m`ggXdOd_ zU(Z3)_2(vseW*B``=MNl$KVHVoAQIrs_U+LGbG1etl=+{5AbGW5@EnyHUd3|1dvNg ube-stjL=pHENh90a&!~XLl|MA8w&#iG2tEH&B_MS#SDb^fV31Vhz9`Y0FA@| literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-costume-name-infinity-nan.sb3 b/test/fixtures/execute/forkphorus-costume-name-infinity-nan.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..57c0238384553530625bb2759bb3d5db09f2c60f GIT binary patch literal 1632 zcma)-do&XY9LG2FD3j+x<&np|j2ouW!f-LNjb<34yta{IVO*N`XxZ(Ow}phIlDCN4 ziR6(@d4y1?6tbu!E}QADgYq0vpp9<2_Xei4MHL*VPjsQ6rQQFP`^*m=-B3N^SZXc@WAyuckdo@ zyIx}Ie)DjHf=@9bN=0&c<0I|!LmCJHaT26#DK2ajcSQyZGa&f}?iy9db}hwdNHnwx zy3Yl)IYBo?KazrXXTMgvQNOM#6i%sZo!Vp|x2cvJ%L_TfhHF+C?J;kjQstHyiuW$i zV~^ca0EH{|*3lT`)Uj(gxGM)TgAMd-qUQ+P2DI_m@z7OBErla4fK2BV$Crpr4#}WwaI_f$yxJ&~i7! zn^z;zM+$8Gds1Hliru!;L*|%mW_+b8FP(YznQJ&Z%k&0Ynr=*lZhxu-Ld|tDKb8A7 zmw7(fy18yh#n`6jes_Yh-@z`miW5<0Qu}We0$x{au(JMCDoMiMOZ+4L2pYboHK5a* z(wD9onFr!PnhDey7en@}jNC*@H*Hv>czvi(o@_?|*N#SjS6r}7!ZGCpK<5r(phE(U0aFG)PxauOk2khqubd`!EcFX*x zbeSDj4O+3(6wO@F_RD1er{U%$d=&a&g_tuKv5xU|@hFn6*1}NavI?~NVH1$bQ)}1v z8TiWq^E`KN+Iemvxe5}7ox#W{PpJN0kkwWdm!nJt`=m-XI2OKx`; zw^^HVNtMH4B`0TmTf9HwS zfBb6y>=_s!8l1lAe6}haYVHF~W)BwJ9}5QMf1l5fn5I0+~#Tg7-_Z7Rr-!>boTcOiOW6EuJp<-k5S6hLu zL3}ox`4%?JePf6c*~I$(5+U30?wQ%*HJ=ayk63?7r-+{|hT>^Y<8%gP+Z-@#p_yTy7iE?aWDnp8Meemrz(t~yF{@<}FfHFDdo{pmOt zd66KjiOMeXArp9PpSqlJK9i#v)!0$yJfotWMOlaDeYQ@ItMSkkm_yL&0s$HJg4dwP zMK#YhoSO~|jn7O&S@fF5EUm9LZA7cn(JEp z7j3aVYh+){qz^Y?f2EEh)KG=1^7$}vNX3fiCtczNi43ezmJk%b z(Ua?Ao;rG=1G2!J9l&vSN_(dQiN-J! z7@TNiau`M?lF0$a#>Pf)k`XD;ghWKZ{S6|cgF>A!()5FnDH?P9u0(e&{9(D{@gapf z=v23!2e*e_jGriQBEwje1LHt~LiuWw4d*AD2&7lq-V~Ft`a2_IEb5AvMoxWMic|jx z!XYg`_;l(q=n8e-QmS09AAh#Xfz7EXD*c+$SbL`7-c4}QdbhIA>MV$*rbcOvdhJ{y zChl-#Th#LCY-QqZKdjR7UzkJy4g(Z{0REfbJC}VI-_!g@<&TE^BU{}02mi+&97at1 Pn@VISFYWYpv2WAgT`Sf+ literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-for-each-in.sb3 b/test/fixtures/execute/forkphorus-for-each-in.sb3 new file mode 100644 index 0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KB@|Ys|AS-at8efZu)$l|EU)>?O~#)Je_~( zA%s(X2P3qpjUiAKulyyZ*mBV4{1Z&CJw21r&(gGC%d@3D|ET5u6@X^Kv_G*^CG@ny zFD1mC&W*bb+E!B}3c`7K<5bK~@z%-ha|#iU8yi=*ta?_|&cDO-hMIewEY*1)hP_-w zU45I1P;)X**n0xj+1NeToy84cFli1KJg1zzL@p+@$-E-0zr05%o4wttJ1JB)3vAUb z<}a3W?Ki@H(9_!u85qaOY8V?_o4}RI$SbZh4shg8P2Y4kJI<97~oFAf{H-0(% zv&xqB!FMMfw1%E-@=w{#~3f(953li(eUK4yrp`F-7fAF3d!l(rH zHM)m|>@~i(v&YoewuVAorfej!JjCX(pr)mr<%GSc<>5OYvO@KoC=H)hWDUz+GN=a& z)YyKa#oZHHw9ZR@Rv=+ge&jrEG|$V^X9XS$N3GrCd-=XVS!;yX&3es8aO7*(t@6Q@ zJaTt$*Lck4NzU?%3Z3b|tCh}w4)Jq%zWEs6P1hxk$zp0m!lZX)*=JFxWlFT&dnA5O zoZhUq+8uV#xc1>=&bA}M&X{Q)<2;jks4`d3LMYEP+b+CX_*$-fw4fy?Z?iHkEv%~9 zy{b&{hBZ%Q+2EP$Fs*lVC8$n;Cu%8X($wf`%PaZSQ2n#Z;U3@aOM0p4f8U}~tuMTR zaeh~7-?_q7mIR~SHg15dTLTq$W7bsD+TVdf_Ago9ORdiCUP-A(s$5((VJt0k6gP0pOjDu8)>PxEH>E>8DL+KkgJ!CZr z{#VR8nprJnYzkat0u6(o4qjs*BLFBQ6SE-Tf4i8Y o&i=9f>1qC3`QJePE!#M9MgI>T6q1$guZsC-CmfyRzcvc+FDe9H-2eap literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-glide-negative-time.sb3 b/test/fixtures/execute/forkphorus-glide-negative-time.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..68fc0b05373b911c1638df186c5e55a096a62c89 GIT binary patch literal 1674 zcmWIWW@h1HU|`^25LoOOuE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5RFqz9s{amhW>O{rvXVF( zlxN;)vjp5veBRO`#(Ob}dt%U|mxt!cAC2_VG-Kjla&B_$y#EI_tXFh^i}LVn>UBnF=Y7l95h{jZgSX%io>}d%B6S=e(<&_KiI6g z?y5IKa_q$#{xbOhZ$>5&2HfQ`&~r!txs*oNi5|%aZEu0)JTXy@ZX$XJBTPKR!oWaG Vcn5g1vVn9l1K~X&J&hH_0|17C#6kc7 literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-glide-xy-NaN.sb3 b/test/fixtures/execute/forkphorus-glide-xy-NaN.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..1729ddb7cbae16d20f3ba5d6fc518561e240ca33 GIT binary patch literal 2233 zcma)-c{CJy8^^~*GNy@)=;|UA5e75XYv)?VGLa_JD8tMoLYA>>tXT??B{XRUH55&V zMD`_lE%S~gnrm-R*|H3-Ip06Np9hKHy#oDw%X7~AebfPUHQ7)iMtOYQ>h0Bfdxm=| zDIbQV*uI|UA$jK*X+MvCv$n~>s7*v=EfxnesMqPa#>Lkcx{OXRIPH$)7&tC8&>=oq zr8gQ>{wU58m_L(0XqbMEb{v)w{gN}=^?T^1>dsZx?kaY3v)65VZhsXNXO(u4)%IT(&A8o zH@;M?OyZQnys`#J?%*XS9~2kU)VPs!el1o%7^9Z;JQElhY4TsOd7)ktlneSD!s2$< zYs_KrXGdmh7No;XS>vl8>yq>rJ|w^Y^0~#56a+wP&-TuZD??Qe5Oteqe*02bIWQM} z>9EvLXjgbf`yMUx?9%4@Y(!Y5wYg^VUFRM#U(8^*p8qqDl0QS(Lia_D{Awtq=uAwA zXjr>Kts)p07C4)cRUJ9|o0gmrL9Bir?$mZat^p zFLY9LwAMVsU%*3hn^CDjzg1yX%njG}9XkMF=S6O;PURtnL}MgZIH zDt<}VhfPNHzt-zmTHL%QL$lvqT;BQ?v|bvVT%-IvDr9yjrG?qcf6%8sS;waSGJJ>B zdDWqRLV)I_GOy8@vg4<|Y^Wjsk-nrp zVV?W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)SL*8v?uoJ#?$Z!x})K4!m5qJ zOCz>tR3EN#xZ>Ngb6PX=PE%*Cd^*2h(|?aE!O+p6wB7sYRw5~dvk(Gp(A;XOY>gcwTt87kKm zM1!l+4~w}+{4-l0aF8um7V~g26D1DYY^iV6=&fRml2-BL=V08>9*eH7IN>K>;K^No zTLK;Mbv8taD^-pa29%!nG`}`#YL)Rg30j;C8OGB|Y7BK4Z6XoD`Vf9^BVY;h=`9lw z?v~SwY#1xNxs%)%y_2M+02e4`>T_CP%o#j@7%-8hln5o@#l%$s|6k=qaKBo=*1XRn tKX39cVOAp5{5>uIJmcpT{v{(=3IO;$^(NpYMK1vW3DI5>`G5a>`Y+sLY?%N6 literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-negative-zero.sb3 b/test/fixtures/execute/forkphorus-negative-zero.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..c2f45e0850f402d48f4a85143eaa5022c87aae99 GIT binary patch literal 2045 zcma)-dpHw{8^`?m7fFyT0058% zkm|eKOx8=92w(sJr3(Pa?QO48!h(r@5hlUZu+Rw)5_QxHzH6km6j?R_^<`S_VnzBo zcMdR~Gix%)`)0H~vy4xl)!$vZK`aD4kF1gR*J7%5FgC2jz(?8E8G6OoDGJzXeeDk?uARca}?Va*uFaGEb1_wn{PiALv!r0>;|ZCI@2Q z6xa3JO!u}cTWdEcC^>ot<5x6TJVP?cJAtlR|0G`HLo>}}G1?I)|LcO2^90UPj!5-d zQlF^0XqaE0^9*s40wW>^iXgPf>&ohy`{VmCOn@?b?QI7TCCl{ikK$X@y zX^a8DbMiQfPa)XhA#AOag*h{)r%=ZTmEPGdPii@wNR8)n9yIlV$SaB(7ZZ0UMaA=@VBH+*f^yxYi3Mc8UaMI+icSSUKfJ% z7+6ra(0QP4FkaYC@srX+h|}+-`hA)zMMyaWW=&;CX!KzY7Z;sH)ebexnVWbFIeB3d zj$#}nS#~$0C|!Em-U~kWY{jj>;aV=RF(u`!;teHaOUydRbGSD35B;==T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i)aGyR4+faQUORIVRp-`Pc?C;CX&GBnR@U7M$e?1ecVoUgpzXaYF=x9wu~(ZL-n2f*drkKtr+#*v>K18m$yhL6wi}9T zsW->+witR)&yo z8{?dh7~j1nQ0BcVk(_jS6eALmOMI!BogTr9y{9O^c%7#OO1m3A?)QB-8Gdi6Ap6nb zs_v+I{Hp;X#rbA}K`3^@F(}%vg%W0+K&GBr5JY;Gkx%$>^Xed$GqR-B^(BJ{YSX;O zdw7*_5Em`$s+TmcdLr%0;lcs8$ewh`V=#z8XV~ zu)8u%kKspl9A;|&!TDBUn5Azu@njq%I4ymVQN3{6nGjKmmZ9y`0(g|jj#jBmJ~Ilr z1}ti&zD$etz!N{e6r?JZWc5vt8~Wc#F>wtjo4G2H<7(>Jvmtcv(Z$#TMPvZ~&GfA! m{}4YC{%7US-uxrGy!9jgk5d?1v2EW~B3nt@>Rn>rr@sODCHF@F literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-operators.sb3 b/test/fixtures/execute/forkphorus-operators.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..71a6758683857be76e15aee63abc6623f0a37b38 GIT binary patch literal 8340 zcma)?Wl&r}x2~BPoC!L(6C8rO2X`GLK#*X;-Gam5F2RFq&;)l&kPsv|1j69%u5**` z{v_9st+%V!kJXwgAY@D=BqVes`<7u%#EPl-1r-vKi6sCD{P(Ym zo3ovjg$IY7yR*~Lr&#UZKhh&izw_mgDfTW5(uY7<*QomWm!f7okj9EMK>*Y>&`PL*P%~oO(*T93KrxrqJRYDLVMi)os`8`Y2dOJEZ)1Rcr zm6&$QGFt;;FOr#aG3f88_*t52GVUN+yRRE6exN2nE<|Kdn zh#(djS%M(HEdeL=DSN}%49lh82P(C}M0F$41Ct7B??1QFH^;D4_P%%In;F zRpvQI?Rn+K0AXGJC|Vm=KR0_XCLB&K}@O!57$I$+U@H78QBOi%<>YD)jP|cp;LiN*t{!3{3RKVBSOfQm59oSxm zvZ?}(rozX9<3-YWXY}ma<<^w7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9$0FFLvs$J%Y@a-x^Y#Cb3o2P|Ffu;qIcfg!FtZ+YpSnm;U&BaCm2jQUM`S>y;V?Z`I6^kN_vieYq`T z4v^=LmLM3 zCV#X}V){S?X(>^>o*KVC|IiT}<$7G(>x*!4MVOh}7C$Z9crr*pf3G~3zmkmVV-GkI zG;;`t^IgffWKV#8ECrxyy1bi-L-lbA4v7+qTouEv4*LB*nU8Mo6_Q}sWcJnFogs)! zqtQf@kh`g8>2u_|enu#BZLDR}cJQ~=#}`a3Kb=eKpN#X+tlM2@D~^P<;Il?;+vVv0 zw@Vt+ky&3sE093=QOu;}d*qRHpnz$kdjs!X%3Ic~aA{h754QyVg9Yc9^=*KzU-Jsv z$4vzIpCuPRFSoU&we>q59v&_}D=sSwek)5MK64ItFB?ZS73?q?$g*F| zd<)vQTE6}wC5=gfMr9cEdvDd`?|H)vHEZrHXYzS~9zoGXgY*c4w43;waKcc2r~1a} z*({HF;e}iY#Xy+Y;a+)=_PT0fmy0;+%X$=+|2NFC7(F!PnnN zj4#$fSyWWct)6S@pHNU01fP*5gxAZ0Fw9hmk8V_gkTg{QKnT+R-1Gk%*?)Qd>kWYa iuKe!_`F}D>>i=DOG*wVg|EYj~-?+c?`ClCp(*FTqc%b6| literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-preserve-order-after-stop-other-scripts.sb3 b/test/fixtures/execute/forkphorus-preserve-order-after-stop-other-scripts.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..9c9a6e0e45177734e41afaa27a63fa11df3adcf9 GIT binary patch literal 3119 zcma);XHXN^7RN)cQiFspJ%B*KP$Ik3ASG0hUW5cfTRMo;AYH0dL8NyP2wi$pq#KNa z0!t?#Eh0)p1Rgu@!|posX5PJX=FYt{=iK>yIREoEK~PZA0{{S8fM>_3i2%@dZk!qb z=o0_{7%yLa{e3)KP=PWY0Y2Wn)(mFlH-YC;-Uq!mRJz|wXL|&pU8~!7Eb4;1zNy-E zuwTPjT?1))?*CXO(v?JCMe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CGexNwt7a2S(M_Ac4tNI%S?;Rq|Q}vj{LBmq-cEk1*i1Kd$*Ro^{7%E+0Y3*8VHc# zi9b_dT|=J~Sw{;~dPrGL%*Rf7Ib`+8}{{~tm6wc@Y+|98bP8UWz`Q3DeM)#cv+ P0LA5Ax;#}F{<{4Ktn7~{ literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-procedure-definition-order.sb3 b/test/fixtures/execute/forkphorus-procedure-definition-order.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..77cc6ff3c8ed73eee7c7020e372c45a2e475568f GIT binary patch literal 1752 zcma)7X;c!376wBIH{92>@{v<$jgkvyQe*Cv;{t9uQVK5Mpdyy$(_C=P!Uc6SpIhnR z5^gA@)u@qcn3Je)ra~h#x6Cbda$%hL^XAPt@0@q<`OZD}p7Z^<-;eKe#T)?1004l4 z05Z4VHMfc&vXBMp#*@otwP&>5 zdS27~=K_l+E0zwPhHj}bhWnXKc4xV)ZI8$PhWE7mOcku6tnI;Q9@bBwp9h5LU;d^j z=^w=#K>IAi3^nuIr?0y{#@ej4v}GSEM{3L@p&Ez4IGH90>?l4Gpvfwe|IWYBbdGLK z0@Xx57q;wzWizz3j6%>5o&t>4r}{`mR#$9Ngc$E4b)-CWvCXUN=^f^)oo%_|sA0HM zatlBXm==z!Np$-A6Ss_?R&R7JbyHY?7H%rR-LV@Gx4feI7{ENJC8aJ zA3~M)SMpn{U2=nHCp@m>YGyaRb`w5L7u1$xWc9N&6)@@@qKA1G574?^x#r+hUBFr3 z=UMLXiXWs<_GDCyEy&YPuCFxcq)}Qq#CW%Rdvr~OoT?0Pmx8}vceC#P?ZmUtcZvzp zISIZOI#|P%N0c-wCMvPXX(Hq713IAMqDzyg!371T*8*nE}v2x zydVB;buG2XK;ThgMQtwnl09LQ^z+dH3pCV0E>7XzFr5c`?&4Mh6MRC!)YDokU%9&R4mK(A+umvX{4OTU z=T6iF+UdOLNhuh=>GA@JSOxnW-y5g1uUrRleE1A1zOVOs*nb}!qOx0LPP zTbTBdnUygW46Q+uy|^A3*pt$nRQrk2cGnmbtrkPC*+@fImcigY9~J0Q`mkADo`lHB z9A`AaDVgcV@U@QD>Tz>j4h`?Tr0NhkNeEjrgFAU+_CLnEE(l@29*Zmd#j4P@pA^2u zI2@HfuFLQlHIMfW@lczZwazVl2HhT)OwC4*b}uaTu?x}I0$~t=sN|>&kti$YKbdw1 z67I5KpC5FUr3=WRzp5YkLh8*vd8L7#+M8%vlK3>B*DecUV^B#K&BdQ*T8=Q`Kajjx zZnZelmqhh;8n#|2kdFa+`1O~Lu#`sFc<0k*8L0w^&^@*BQa2|S(^j#ra#Ad#;g2)i zI_LUd2AeUg2+ZF%*1>(i_Yp`ynwXiG5{%7Gn*6hAB%n;Mo{G8_ z{QV`2Ldp@<*Kt`BTnL|S+EeB9?T8A;nT~zdRX_4-!nf#BkV$d4&IHg?rE0C!X5g3& z)!HXjE!m9H#2FncrmgrK&2OqqzBDw7a!4%<38g!pSfS0J<*E=v?qN?I?ho9%TP{g% zVUwFXS+a>6d`-VK@quDJy>MRiTbF-HgB>jPKxj*G%}wZ)iy9v{F*gCO7@(9Y;D6`F n{%3!wzoy9FnSU4LKeVg+IrRU?l@9h0){^#~PZ5S7n literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-run-blocks-after-self-broadcast.sb3 b/test/fixtures/execute/forkphorus-run-blocks-after-self-broadcast.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..444a7addba6447f9bd55d48a5fa60fcb200226d8 GIT binary patch literal 2103 zcma)-dpHw}7sqFs+q^Mb)7_HEJ-3!6Ss}MDavO7*OhuuFX>Kh-wJt7`kZ5iVm5{lF zkx045lG}?h_q*1G@$>uZ_x|4Jd7tM!=Q+=L&Uw!Fk8{o+AFQSD4haANAO`TOXu;kN z_ml;T003+I007DDZs7F*U*d%z4PR1#|2)o*)UO8sV+l;q&+qE##+-E zkA3W>@mV=h?$~g4v`U!E*POXR`idM5SJIaTS~zGpWQ|S+M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x$TL5b zxNkXG7x_%^sVCp}kNd+Xt7d=hG~`wH|ESe>8L8&>MmV`PlZTMCmiddee-^L0k1DAf zlr@s@@QoL7NoWpTQ!ox~C5sO)^I~%HS`D8*DqoopP2Si-A6iBqdSwVVlc4IPpvD`D zgf@}yo{+CADd_odUIp2XM9RetJtsbmzVt#FECr=qC1h(M?thpF3>ugJEt&ff$8wvF zReYJw1=}ka2~M`B7mHO(-8yz9#^u&%9GIcTn1}dKaf4dHJ&2mU(*1G;OLot68qFVH z2sef%(SQ#5Jvzy$GMUCTSRA7pZfvq+rn2Fdj15p0vaVrESV7*=@6KV2S^FQ!H!Ngf zTjpU6z`4Zib?i@fhwm8ss`EK@A&9CC2ItLfAbU+UBscuV(n@YOxvZ7UnyTxO*^6157)(Uen)T+KjHF#AF5J?VqWI zuQroH&&CHtS}d=IdzS~8T!&6fZG literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-scripts-run-after-stop-all.sb3 b/test/fixtures/execute/forkphorus-scripts-run-after-stop-all.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..8c2529ea7ab116c69e264daf989215d8040f973c GIT binary patch literal 2485 zcma)8X*3&%7ETDYb|I>wwAK=_6OEWwN0?R=^{919L})`L#9l%Zwbf41A*eQJwN=!X zMD1nlYE)3Bwkl$;eS7BDn>XjYbKbq@o_p>+=lk=0Kfccr%?%O&004Xd&+2x|chiqN zVov}7%8CGh(D9e(OTgo>erk9U!F$m`m^4{+_CN)-m_6jp|5!6QvZqI7#|h5w_Ry~) zyU+k5XzA*h2s7fN*Voxr-QXn9*oupu9^-C`ShVfu{{C9qtr1vqL#SCK6_P24qUAPV zDG&KuRi5?IqAK{Rma8650=LW&9@`OiHK>T1<2;|E&Df8c=2pWnuWMvMS=RP zmk;n9RO6_Wa3!7GoQGV`>u}uY58HE{Y9l-obVucpT?Rk8FK4eYaa#qS8)jSZhT>gO zAw{!GoC7-v#PSF0?p*k2y;{dDUM$>iOA?I@siHg3lj`gDKJ^7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CpSyFV6eiJXrGr)bI!h*37PM33%vjRw@fN_<(Q>bAM209tocOguFap`_Dr;xv z(p)aJND?Z41j>!fa7lzDTUZ85(pUKzCj6aZ~yXxH;~0Ty_fL=QDe xJ^%A%{x3I4&{5I<$*cXJjQ<(p|6+uq`JV+`Q3e|3j~689e;w2=f&9S0{ujkh->U!s literal 0 HcmV?d00001 diff --git a/test/fixtures/execute/forkphorus-tangent.sb3 b/test/fixtures/execute/forkphorus-tangent.sb3 new file mode 100644 index 0000000000000000000000000000000000000000..3936fabe7015c3403dc7b246477c97824a457aca GIT binary patch literal 2164 zcma)73pCVe8~?jo!%(i{TEeCenZKDqJMK2tAO?fch%qy1OeRw%pCqOsS*eiRs?})7 zEw_;<6pCCvGKQ3h(&n;mja$(-`<*>!cRS}hXW#cc=RNOp-rsZH-}5`?`FUX^B;^1A zkOkzbwfy>jYL=>y0sxdT0LY87Cm3`pIqZ}f^&~x#mq+mDSZQBqNzHul(xx~z#+WzX z8(9%8@D6&0b9puuCBasMNIKzz2rZwbM>oZlckQ5~m9R1ETY9ee70JB@Va|K{o8!eJ z5k)7`?DI2VrHQ~MO{;vA8Unot@ldR8J~T1j^ybsT=DFX5!{n~F7*&fKTdP76=s_cE-c{DbUfIwy1nq%9`J#56jCoa| z<{(?ZH?s1Dl`0scTiY*W>7-1D2_!kP15Ww#LG@fs>KIO*5KVgqM|$|oxH@Df&QWw~ z`kIgbB4s*o`e-zRWn5$iZA??Xis={3xHSsp>V~+>aXu0|Zb~tG`szQ7U?Sc8Mr6

mY&;U$73e{U~i+}<$yS95+>5Jyhoq5`AA!y7D ztOvdDV3pen{dC(>6?zeKHLoK`@9q6)zSlWTJgYf$?J18hn>W@B~90cDc9n; z1TA*$JLicaOKoPeFhGMkkN2C5_palOVOu>+(x&wP6MO`oXRl@Vu*yeUmt(ywP$)mY z36;E%VxQV&S{uT0()IkH@vl0GIz z1$xSIw2KM&YhbyXpC!pHdNG}?1Nn8nO;Rdd=2`X!ybr0xE3tv8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sv@*aRl2vXGHgb%R5>re3sc-+JDVl6JA&mbA5=`ih{NP}=)@PvC~?F2+KT(?kMHF6lBO|~JSCUTl{&VX!T=s}6+8Ly$ql`ZKsRHQ zxMERXCgJAS)|%3N)%Rt+KZlIHAa-HcB-LCsL)HKjQTHl5dWP@@J@=#%2=`2TjJ(&E ziCc_mJHB{YQ{H@CA$iY4tzqR51_&bz#3?dGLWzm10RP{CMdbdn{_4lyBEJ>+PuQ@? m(f^6$-&Xv#!+%yRmj-};(r+(}l;|Y@NQm|u(U~Cg`|ZC3rK!mP literal 0 HcmV?d00001 diff --git a/test/snapshot/__snapshots__/forkphorus-105-contains.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-105-contains.sb3.tw-snapshot new file mode 100644 index 00000000000..ba4fc637e92 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-105-contains.sb3.tw-snapshot @@ -0,0 +1,45 @@ +// TW Snapshot +// Input SHA-256: d641b68a89119171eff5d36de1bd4f59b1649acc5ae55803fb0b797b636f52bb + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"](("apple".toLowerCase().indexOf("aPPle".toLowerCase()) !== -1),"apple contains aPPle"); +yield* thread.procedures["ZassertTrue %b %s"](("APPLE".toLowerCase().indexOf("app".toLowerCase()) !== -1),"APPLE contains app"); +yield* thread.procedures["ZassertTrue %b %s"](("appLe".toLowerCase().indexOf("LE".toLowerCase()) !== -1),"appLe contains LE"); +yield* thread.procedures["ZOK %s"]("ok"); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "n", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-112.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-112.sb3.tw-snapshot new file mode 100644 index 00000000000..babf8baf6d1 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-112.sb3.tw-snapshot @@ -0,0 +1,45 @@ +// TW Snapshot +// Input SHA-256: ff616461f1a16504b3a7be65eeecfdd29d31e897c43157fbd51370f72458852d + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +runtime.ext_scratch3_looks._setCostume(target, "costume2"); +runtime.ext_scratch3_looks._setCostume(target, (" " + "")); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 2),"costume should not change"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "n", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-263-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-263-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..acc5b25aebf --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-263-NaN.sb3.tw-snapshot @@ -0,0 +1,48 @@ +// TW Snapshot +// Input SHA-256: 67ab3b26c771f54d4181fa85a76430fdb4603a171c36a918cce1374c89bf9c23 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["rL_u6{W`ET;GKBRHZrag"]; +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"]((("" + (0 / 0)).toLowerCase() === "NaN".toLowerCase()),"0/0"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual((0 / 0), (0 / 0)),"NaN == NaN"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(Math.sqrt(-100), (0 / 0)),"sqrt negative"); +b0.value = (0 / 0); +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "NaN".toLowerCase()),"NaN storable in variables"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "n", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "r", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "t", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-264-setCostume.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-264-setCostume.sb3.tw-snapshot new file mode 100644 index 00000000000..1bc3f57e06e --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-264-setCostume.sb3.tw-snapshot @@ -0,0 +1,75 @@ +// TW Snapshot +// Input SHA-256: 801a8e9ac5e607f022601f2eda4bddf37b29c30627f0e24864c7b0f9cf7b65f9 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["G3sNM{+Wa29PviNsXl~;"]; +return function* genXYZ () { +b0.value = "4"; +runtime.ext_scratch3_looks._setCostume(target, b0.value); +yield* thread.procedures["ZassertTrue %b %s"](((+target.getCostumes()[target.currentCostume].name || 0) === 4),"cn=4"); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 2),"c#=2"); +b0.value = 3; +runtime.ext_scratch3_looks._setCostume(target, b0.value); +yield* thread.procedures["ZassertTrue %b %s"]((target.getCostumes()[target.currentCostume].name.toLowerCase() === "costume3".toLowerCase()),"cn=costume3"); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 3),"c#=3"); +b0.value = ("" + "4"); +runtime.ext_scratch3_looks._setCostume(target, b0.value); +yield* thread.procedures["ZassertTrue %b %s"](((+target.getCostumes()[target.currentCostume].name || 0) === 4),"cn=4"); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 2),"c#=2"); +b0.value = (4 * 1); +runtime.ext_scratch3_looks._setCostume(target, b0.value); +yield* thread.procedures["ZassertTrue %b %s"]((target.getCostumes()[target.currentCostume].name.toLowerCase() === "costume4".toLowerCase()),"cn=costume4"); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 4),"c#=4"); +b0.value = "4"; +runtime.ext_scratch3_looks._setBackdrop(stage, b0.value); +yield* thread.procedures["ZassertTrue %b %s"](((+stage.getCostumes()[stage.currentCostume].name || 0) === 4),"bn=4"); +yield* thread.procedures["ZassertTrue %b %s"](((stage.currentCostume + 1) === 2),"b#=2"); +b0.value = 3; +runtime.ext_scratch3_looks._setBackdrop(stage, b0.value); +yield* thread.procedures["ZassertTrue %b %s"]((stage.getCostumes()[stage.currentCostume].name.toLowerCase() === "backdrop3".toLowerCase()),"cn=backdrop3"); +yield* thread.procedures["ZassertTrue %b %s"](((stage.currentCostume + 1) === 3),"c#=3"); +b0.value = ("" + "4"); +runtime.ext_scratch3_looks._setBackdrop(stage, b0.value); +yield* thread.procedures["ZassertTrue %b %s"](((+stage.getCostumes()[stage.currentCostume].name || 0) === 4),"bn=4"); +yield* thread.procedures["ZassertTrue %b %s"](((stage.currentCostume + 1) === 2),"b#=2"); +b0.value = (4 * 1); +runtime.ext_scratch3_looks._setBackdrop(stage, b0.value); +yield* thread.procedures["ZassertTrue %b %s"]((stage.getCostumes()[stage.currentCostume].name.toLowerCase() === "backdrop4".toLowerCase()),"bn=backdrop4"); +yield* thread.procedures["ZassertTrue %b %s"](((stage.currentCostume + 1) === 4),"b#=4"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "I", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "K", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "M", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "O", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-285-variable-id-name-desync.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-285-variable-id-name-desync.sb3.tw-snapshot new file mode 100644 index 00000000000..95718123ec2 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-285-variable-id-name-desync.sb3.tw-snapshot @@ -0,0 +1,44 @@ +// TW Snapshot +// Input SHA-256: 1accbfd57a291524a062413a9c361d51e94ac5555fd3d861dd2d56806cd7e8c7 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["T{7z:Z^j(zfah+5ca3R0"]; +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 33),"uses ID"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "h", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "j", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "l", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "n", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-56-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-56-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..c19a254e669 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-56-NaN.sb3.tw-snapshot @@ -0,0 +1,47 @@ +// TW Snapshot +// Input SHA-256: 930b81005746fcf09490be69206cf92f6b882a8d4d66ef9cfa19139090131aad + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "+") || 0)) || 0) === 5),1); +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "-") || 0)) || 0) === 5),2); +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "x") || 0)) || 0) === 5),3); +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "-=-2398749") || 0)) || 0) === 5),4); +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "") || 0)) || 0) === 5),5); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "A", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "g", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "C", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "l", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "n", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-58-list-reference.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-58-list-reference.sb3.tw-snapshot new file mode 100644 index 00000000000..7af7a095173 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-58-list-reference.sb3.tw-snapshot @@ -0,0 +1,60 @@ +// TW Snapshot +// Input SHA-256: 95f7dfd29f2a3aec8027d03eab202b439a7630a1ee6b9a7cf534c7d971e41ef7 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables[")@7t1F9WM1F[_jBWx]7["]; +const b1 = stage.variables[",VHjOaLurDh*^;8kZ~I?"]; +return function* genXYZ () { +b0.value = []; +b1.value = []; +b0.value.push(3); +b0._monitorUpToDate = false; +b0.value.push(2); +b0._monitorUpToDate = false; +b0.value.push(8); +b0._monitorUpToDate = false; +b0.value.push(4); +b0._monitorUpToDate = false; +b1.value.push(listContents(b0)); +b1._monitorUpToDate = false; +b0.value = []; +yield* thread.procedures["ZassertTrue %b %s"]((b1.value.length === 1),"output length = 1"); +yield* thread.procedures["ZassertTrue %b %s"]((b0.value.length === 0),"data length = 0"); +yield* thread.procedures["ZassertTrue %b %s"](((+(b1.value[1 - 1] ?? "") || 0) === 3284),"output item 1"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "n", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-66-insert.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-66-insert.sb3.tw-snapshot new file mode 100644 index 00000000000..874b944bb1d --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-66-insert.sb3.tw-snapshot @@ -0,0 +1,54 @@ +// TW Snapshot +// Input SHA-256: 6bac3cd99997a7deae133a560824b5dc3801b8e7e41ff3f9daab8fd6282f890f + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["$h5KnZ-ePA3NOi=];]FX"]; +return function* genXYZ () { +b0.value = []; +b0.value.unshift("a"); +b0._monitorUpToDate = false; +listInsert(b0, 2, "b"); +listInsert(b0, 3, "c"); +yield* thread.procedures["ZassertTrue %b %s"]((b0.value.length === 3),"length is 3"); +yield* thread.procedures["ZassertTrue %b %s"]((("" + (b0.value[1 - 1] ?? "")).toLowerCase() === "a".toLowerCase()),"1=a"); +yield* thread.procedures["ZassertTrue %b %s"]((("" + (b0.value[2 - 1] ?? "")).toLowerCase() === "b".toLowerCase()),"2=b"); +yield* thread.procedures["ZassertTrue %b %s"]((("" + (b0.value[3 - 1] ?? "")).toLowerCase() === "c".toLowerCase()),"3=c"); +b0.value = []; +yield* thread.procedures["ZassertTrue %b %s"]((b0.value.length === 0),"length is 0"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "l", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "n", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "p", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "r", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-70.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-70.sb3.tw-snapshot new file mode 100644 index 00000000000..ae6ab5f0f70 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-70.sb3.tw-snapshot @@ -0,0 +1,43 @@ +// TW Snapshot +// Input SHA-256: 25ae3486d45378eb1c50784721d62d71d790c4687871f5961f731f1880137db2 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"](compareEqual((("0123")[1 - 1] || ""), 0),"letter 1 of 0123 is 0"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "h", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "j", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "l", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "n", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-and-or-not-cast-to-boolean.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-and-or-not-cast-to-boolean.sb3.tw-snapshot new file mode 100644 index 00000000000..e1ae77aaba6 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-and-or-not-cast-to-boolean.sb3.tw-snapshot @@ -0,0 +1,27 @@ +// TW Snapshot +// Input SHA-256: 7bc7268ef7d0d00b445b003aa683b39bcdb3c4c1d4bb7ae03679f553ad22f5a6 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["q9l+ZDG${I3p$=:TPs`3"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 3",}, b0, false, false, "f", null); +if ((("_" + ("" + (toBoolean((b1.value[2 - 1] ?? "")) && toBoolean((b1.value[2 - 1] ?? ""))))).toLowerCase() === "_true".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "m", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "n", null); +} +if ((("_" + ("" + (toBoolean((b1.value[1 - 1] ?? "")) || toBoolean((b1.value[2 - 1] ?? ""))))).toLowerCase() === "_true".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "q", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "r", null); +} +if (!toBoolean((b1.value[1 - 1] ?? ""))) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "v", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "w", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "u", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-befunge-eratosthenes.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-befunge-eratosthenes.sb3.tw-snapshot new file mode 100644 index 00000000000..0ade0f0368d --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-befunge-eratosthenes.sb3.tw-snapshot @@ -0,0 +1,437 @@ +// TW Snapshot +// Input SHA-256: 81139c5bfe7cf38a74769e99279d2d211e5acb5dbc301dbd2bae79a6676015a3 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +thread.procedures["Wcopy input"](); +yield* thread.procedures["Zbefunge"](); +retire(); return; +}; }) + +// Sprite1 Wcopy input +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-P-list"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-input-list"]; +return function funXYZ_copy_input () { +b0.value = []; +b1.value = 0; +for (var a0 = b2.value.length; a0 > 0; a0--) { +b1.value = (b1.value + 1); +b0.value.push((b2.value[b1.value - 1] ?? "")); +b0._monitorUpToDate = false; +} +return ""; +}; }) + +// Sprite1 Zbefunge +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-px-"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-py-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-direction-"]; +const b3 = runtime.getSpriteTargetByName("directions"); +const b4 = b3 && b3.lookupVariableByNameAndType("RIGHT", "", true); +const b5 = stage.variables["o4+OyKx[M=quu6p{=kRl-mem-list"]; +const b6 = stage.variables["4s|,s}H*n$XE+1ez}%eC"]; +return function* genXYZ_befunge () { +b0.value = 1; +b1.value = 1; +b2.value = (b4 ? b4.value : 0); +b5.value = []; +b6.value = []; +thread.procedures["Wget max length"](); +while (true) { +yield* thread.procedures["Zstep"](); +yield; +} +return ""; +}; }) + +// Sprite1 Wget max length +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-max length-"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-input-list"]; +return function funXYZ_get_max_length () { +b0.value = 0; +b1.value = 0; +for (var a0 = b2.value.length; a0 > 0; a0--) { +b1.value = (b1.value + 1); +if ((("" + (b2.value[b1.value - 1] ?? "")).length > b0.value)) { +b0.value = ("" + (b2.value[b1.value - 1] ?? "")).length; +} +} +return ""; +}; }) + +// Sprite1 Zstep +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-char-"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-P-list"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-py-"]; +const b3 = stage.variables["o4+OyKx[M=quu6p{=kRl-px-"]; +const b4 = stage.variables["o4+OyKx[M=quu6p{=kRl-direction-"]; +const b5 = runtime.getSpriteTargetByName("directions"); +const b6 = b5 && b5.lookupVariableByNameAndType("RIGHT", "", true); +const b7 = b5 && b5.lookupVariableByNameAndType("LEFT", "", true); +const b8 = b5 && b5.lookupVariableByNameAndType("UP", "", true); +const b9 = b5 && b5.lookupVariableByNameAndType("DOWN", "", true); +const b10 = stage.variables["o4+OyKx[M=quu6p{=kRl-pop-list"]; +const b11 = stage.variables["o4+OyKx[M=quu6p{=kRl-result-"]; +const b12 = stage.variables["o4+OyKx[M=quu6p{=kRl-mem-list"]; +const b13 = stage.variables["4s|,s}H*n$XE+1ez}%eC"]; +const b14 = stage.variables["o4+OyKx[M=quu6p{=kRl-ascii-list"]; +const b15 = stage.variables["o4+OyKx[M=quu6p{=kRl-ascii2-list"]; +const b16 = stage.variables["o4+OyKx[M=quu6p{=kRl-numbers-list"]; +return function* genXYZ_step () { +b0.value = ((("" + listGet(b1.value, b2.value)))[((+b3.value) | 0) - 1] || ""); +if ((b0.value.toLowerCase() === ">".toLowerCase())) { +b4.value = (b6 ? b6.value : 0); +} +if ((b0.value.toLowerCase() === "<".toLowerCase())) { +b4.value = (b7 ? b7.value : 0); +} +if ((b0.value.toLowerCase() === "^".toLowerCase())) { +b4.value = (b8 ? b8.value : 0); +} +if ((b0.value.toLowerCase() === "v".toLowerCase())) { +b4.value = (b9 ? b9.value : 0); +} +if ((b0.value.toLowerCase() === "?".toLowerCase())) { +b4.value = randomInt(1, 4); +} +if ((b0.value.toLowerCase() === "@".toLowerCase())) { +yield* thread.procedures["Zexit & verify"](); +} +if ((("" + b0.value).toLowerCase() === "+".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](((+(b10.value[1 - 1] ?? "") || 0) + (+(b10.value[2 - 1] ?? "") || 0))); +} +if ((("" + b0.value).toLowerCase() === "-".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](((+(b10.value[2 - 1] ?? "") || 0) - (+(b10.value[1 - 1] ?? "") || 0))); +} +if ((("" + b0.value).toLowerCase() === "*".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](((+(b10.value[2 - 1] ?? "") || 0) * (+(b10.value[1 - 1] ?? "") || 0))); +} +if ((("" + b0.value).toLowerCase() === "/".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](Math.floor((((+(b10.value[2 - 1] ?? "") || 0) / (+(b10.value[1 - 1] ?? "") || 0)) || 0))); +} +if ((("" + b0.value).toLowerCase() === "%".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](mod((+(b10.value[2 - 1] ?? "") || 0), (+(b10.value[1 - 1] ?? "") || 0))); +} +if ((("" + b0.value).toLowerCase() === "!".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +thread.procedures["Zpush bool %b"](compareEqual((b10.value[1 - 1] ?? ""), 0)); +} +if ((("" + b0.value).toLowerCase() === "`".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush bool %b"](compareGreaterThan((b10.value[2 - 1] ?? ""), (b10.value[1 - 1] ?? ""))); +} +if ((("" + b0.value).toLowerCase() === "_".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +if ((compareEqual((b10.value[1 - 1] ?? ""), 0) || (("" + (b10.value[1 - 1] ?? "")).toLowerCase() === "".toLowerCase()))) { +b4.value = (b6 ? b6.value : 0); +} else { +b4.value = (b7 ? b7.value : 0); +} +} +if ((("" + b0.value).toLowerCase() === "|".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +if ((compareEqual((b10.value[1 - 1] ?? ""), 0) || (("" + (b10.value[1 - 1] ?? "")).toLowerCase() === "".toLowerCase()))) { +b4.value = (b9 ? b9.value : 0); +} else { +b4.value = (b8 ? b8.value : 0); +} +} +if ((("" + b0.value).toLowerCase() === "\"".toLowerCase())) { +yield* thread.procedures["Znext char"](); +while (!(((("" + listGet(b1.value, b2.value)))[((+b3.value) | 0) - 1] || "").toLowerCase() === "\"".toLowerCase())) { +thread.procedures["Wascii to number %s"](((("" + listGet(b1.value, b2.value)))[((+b3.value) | 0) - 1] || "")); +thread.procedures["Zpush %n"](b11.value); +yield* thread.procedures["Znext char"](); +yield; +} +} +if ((("" + b0.value).toLowerCase() === ":".toLowerCase())) { +thread.procedures["Zpush %n"]((b12.value[b12.value.length - 1] ?? "")); +} +if ((("" + b0.value).toLowerCase() === "\\".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"]((b10.value[1 - 1] ?? "")); +thread.procedures["Zpush %n"]((b10.value[2 - 1] ?? "")); +} +if ((("" + b0.value).toLowerCase() === "$".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +} +if ((("" + b0.value).toLowerCase() === ".".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +b13.value.push((b10.value[1 - 1] ?? "")); +b13._monitorUpToDate = false; +} +if ((("" + b0.value).toLowerCase() === ",".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +yield* thread.procedures["ZFAIL %s"](("did not expect ascii output: " + ("" + (b14.value[(((+(b10.value[1 - 1] ?? "") || 0) + 1) | 0) - 1] ?? "")))); +} +if ((("" + b0.value).toLowerCase() === "#".toLowerCase())) { +yield* thread.procedures["Znext char"](); +} +if ((("" + b0.value).toLowerCase() === "g".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +yield* thread.procedures["Zascii to number but it lies %s"](((("" + (b1.value[(((+(b10.value[1 - 1] ?? "") || 0) + 1) | 0) - 1] ?? "")))[(((+(b10.value[2 - 1] ?? "") || 0) + 1) | 0) - 1] || "")); +thread.procedures["Zpush %n"](b11.value); +} +if ((("" + b0.value).toLowerCase() === "p".toLowerCase())) { +yield* thread.procedures["Zpop %n"](3); +listReplace(b10, 1, ((+(b10.value[1 - 1] ?? "") || 0) + 1)); +listReplace(b10, 2, ((+(b10.value[2 - 1] ?? "") || 0) + 1)); +if (compareLessThan(b1.value.length, (b10.value[1 - 1] ?? ""))) { +while (!compareEqual(b1.value.length, (b10.value[1 - 1] ?? ""))) { +b1.value.push(""); +b1._monitorUpToDate = false; +yield; +} +} +if (compareLessThan(("" + listGet(b1.value, (b10.value[1 - 1] ?? ""))).length, (b10.value[2 - 1] ?? ""))) { +while (!compareEqual(("" + listGet(b1.value, (b10.value[1 - 1] ?? ""))).length, (b10.value[2 - 1] ?? ""))) { +listReplace(b1, (b10.value[1 - 1] ?? ""), (("" + listGet(b1.value, (b10.value[1 - 1] ?? ""))) + " ")); +yield; +} +} +thread.procedures["Winsert %s %n %s"](listGet(b1.value, (b10.value[1 - 1] ?? "")),(b10.value[2 - 1] ?? ""),(b15.value[(((+(b10.value[3 - 1] ?? "") || 0) + 1) | 0) - 1] ?? "")); +listReplace(b1, (b10.value[1 - 1] ?? ""), b11.value); +} +if ((("" + b0.value).toLowerCase() === "&".toLowerCase())) { +yield* thread.procedures["ZFAIL %s"]("unexpected ask for integer input"); +} +if ((("" + b0.value).toLowerCase() === "~".toLowerCase())) { +yield* thread.procedures["ZFAIL %s"]("unexpected ask for ascii input"); +} +if (listContains(b16, b0.value)) { +thread.procedures["Zpush %n"](b0.value); +} +yield* thread.procedures["Znext char"](); +return ""; +}; }) + +// Sprite1 Zexit & verify +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["4s|,s}H*n$XE+1ez}%eC"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b2 = stage.variables["f]9Ph]^v5P2CT7ju($Qb"]; +return function* genXYZ_exit___verify () { +yield* thread.procedures["ZassertTrue %b %s"]((b0.value.length === 22),"should output 22 items"); +b1.value = 0; +for (var a0 = b0.value.length; a0 > 0; a0--) { +b1.value = ((+b1.value || 0) + 1); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(listGet(b0.value, b1.value), listGet(b2.value, b1.value)),("item " + (("" + b1.value) + " should match expected output"))); +yield; +} +yield* thread.procedures["ZOKAY %s"]((("" + runtime.ioDevices.clock.projectTimer()) + " seconds")); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 Zpop %n +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-pop-list"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-mem-list"]; +return function* genXYZ_pop_ (p0) { +b0.value = []; +for (var a0 = (+p0 || 0); a0 >= 0.5; a0--) { +if ((b1.value.length > 0)) { +b0.value.push((b1.value[b1.value.length - 1] ?? "")); +b0._monitorUpToDate = false; +b1.value.pop(); +b1._monitorUpToDate = false; +} else { +b0.value.push(0); +b0._monitorUpToDate = false; +} +yield; +} +return ""; +}; }) + +// Sprite1 Zpush %n +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-mem-list"]; +return function funXYZ_push_ (p0) { +b0.value.push(p0); +b0._monitorUpToDate = false; +return ""; +}; }) + +// Sprite1 Zpush bool %b +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function funXYZ_push_bool_ (p0) { +if (toBoolean(p0)) { +thread.procedures["Zpush %n"](1); +} else { +thread.procedures["Zpush %n"](0); +} +return ""; +}; }) + +// Sprite1 Znext char +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-direction-"]; +const b1 = runtime.getSpriteTargetByName("directions"); +const b2 = b1 && b1.lookupVariableByNameAndType("RIGHT", "", true); +const b3 = stage.variables["o4+OyKx[M=quu6p{=kRl-px-"]; +const b4 = b1 && b1.lookupVariableByNameAndType("LEFT", "", true); +const b5 = b1 && b1.lookupVariableByNameAndType("UP", "", true); +const b6 = stage.variables["o4+OyKx[M=quu6p{=kRl-py-"]; +const b7 = b1 && b1.lookupVariableByNameAndType("DOWN", "", true); +const b8 = runtime.getOpcodeFunction("sensing_askandwait"); +const b9 = stage.variables["o4+OyKx[M=quu6p{=kRl-P-list"]; +const b10 = stage.variables["o4+OyKx[M=quu6p{=kRl-max length-"]; +return function* genXYZ_next_char () { +if (compareEqual(b0.value, (b2 ? b2.value : 0))) { +b3.value = ((+b3.value || 0) + 1); +} else { +if (compareEqual(b0.value, (b4 ? b4.value : 0))) { +b3.value = ((+b3.value || 0) + -1); +} else { +if (compareEqual(b0.value, (b5 ? b5.value : 0))) { +b6.value = ((+b6.value || 0) + -1); +} else { +if (compareEqual(b0.value, (b7 ? b7.value : 0))) { +b6.value = ((+b6.value || 0) + 1); +} else { +yield* executeInCompatibilityLayer({"QUESTION":("ERROR: Unkown direction (" + (("" + b0.value) + ")")),}, b8, false, false, "/", null); +runtime.stopAll(); +retire(); yield; +} +} +} +} +if (compareGreaterThan(b6.value, b9.value.length)) { +b6.value = 1; +} +if (compareLessThan(b6.value, 0)) { +b6.value = b9.value.length; +} +if (compareGreaterThan(b3.value, b10.value)) { +b3.value = 1; +} +if (compareLessThan(b3.value, 0)) { +b3.value = b10.value; +} +return ""; +}; }) + +// Sprite1 Wascii to number %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-costumes-list"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-result-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b3 = stage.variables["o4+OyKx[M=quu6p{=kRl-ascii-list"]; +return function funXYZ_ascii_to_number_ (p0) { +if (listContains(b0, p0)) { +runtime.ext_scratch3_looks._setCostume(target, p0); +if (((target.currentCostume + 1) > 26)) { +b1.value = ((target.currentCostume + 1) + 38); +} else { +b1.value = ((target.currentCostume + 1) + 96); +} +} else { +b2.value = 0; +for (var a0 = b3.value.length; a0 > 0; a0--) { +b2.value = (b2.value + 1); +if (compareEqual((b3.value[b2.value - 1] ?? ""), p0)) { +b1.value = (b2.value - 1); +return ""; +} +} +b1.value = -1; +} +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "aF", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + "0"),}, b0, false, false, "+", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "aH", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 Zascii to number but it lies %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-costumes-list"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-result-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b3 = stage.variables["o4+OyKx[M=quu6p{=kRl-ascii2-list"]; +return function* genXYZ_ascii_to_number_but_ (p0) { +if (listContains(b0, p0)) { +runtime.ext_scratch3_looks._setCostume(target, p0); +if (((target.currentCostume + 1) > 26)) { +b1.value = ((target.currentCostume + 1) + 38); +} else { +b1.value = ((target.currentCostume + 1) + 96); +} +} else { +b2.value = 0; +for (var a0 = b3.value.length; a0 > 0; a0--) { +b2.value = ((+b2.value || 0) + 1); +if (compareEqual((b3.value[(b2.value | 0) - 1] ?? ""), p0)) { +b1.value = (b2.value - 1); +return ""; +} +yield; +} +b1.value = 0; +} +return ""; +}; }) + +// Sprite1 Winsert %s %n %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-result-"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +return function funXYZ_insert___ (p0,p1,p2) { +b0.value = ""; +b1.value = 0; +for (var a0 = ((+p1 || 0) - 1); a0 >= 0.5; a0--) { +b1.value = (b1.value + 1); +b0.value = (("" + b0.value) + ((("" + p0))[(b1.value | 0) - 1] || "")); +} +b0.value = (("" + b0.value) + ("" + p2)); +b1.value = (b1.value + 1); +for (var a1 = (("" + p0).length - b1.value); a1 > 0; a1--) { +b1.value = (b1.value + 1); +b0.value = (("" + b0.value) + ((("" + p0))[(b1.value | 0) - 1] || "")); +} +return ""; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOKAY %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OKAY_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "aB", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + "0"),}, b0, false, false, "*", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "aD", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-broadcast-self-restart-delay.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-broadcast-self-restart-delay.sb3.tw-snapshot new file mode 100644 index 00000000000..4dba7109918 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-broadcast-self-restart-delay.sb3.tw-snapshot @@ -0,0 +1,61 @@ +// TW Snapshot +// Input SHA-256: a018442bac20400dc82b159894be4f188118b41c2f85528416cdbe2eb221b01f + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +const b1 = stage.variables["XpJYYJ:ZH%1jU!x!l(ZP"]; +return function* genXYZ () { +b0.value = 0; +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +while (true) { +b1.value = 0; +yield; +} +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +const b1 = stage.variables["XpJYYJ:ZH%1jU!x!l(ZP"]; +return function* genXYZ () { +if (compareGreaterThan(b0.value, 3)) { +if (compareLessThan(b1.value, b0.value)) { +yield* thread.procedures["ZOK %s"](""); +} else { +yield* thread.procedures["ZFAIL %s"](""); +} +} else { +target.setCostume(target.currentCostume + 1); +b0.value = ((+b0.value || 0) + 1); +b1.value = ((+b1.value || 0) + 1); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +} +retire(); return; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "e", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "i", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "d", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "k", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-cannot-forceQueue-after-broadcast.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-cannot-forceQueue-after-broadcast.sb3.tw-snapshot new file mode 100644 index 00000000000..61b6860cd27 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-cannot-forceQueue-after-broadcast.sb3.tw-snapshot @@ -0,0 +1,37 @@ +// TW Snapshot +// Input SHA-256: a9d53758e603b449818a648433944c2775495122dab210fdaca971ab4f121a27 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "b", null); +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +const b1 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +b0.value = ((+b0.value || 0) + 1); +if ((b0.value === 1)) { +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +thread.timer = timer(); +var a0 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a0) { +yield; +} +thread.timer = null; +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b1, false, false, "l", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b1, false, false, "e", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "m", null); +} +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-change-size-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-change-size-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..d93fb2bafa3 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-change-size-NaN.sb3.tw-snapshot @@ -0,0 +1,18 @@ +// TW Snapshot +// Input SHA-256: 794320c6ad6c499d6c1e160d8cd1df690fbf045e158faef0df130a0e07560e2b + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null); +target.setSize(100); +target.setSize(target.size + ((0 / 0) || 0)); +if ((Math.round(target.size) === 100)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "i", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "j", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "h", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-costume-name-infinity-nan.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-costume-name-infinity-nan.sb3.tw-snapshot new file mode 100644 index 00000000000..6c1aee826ce --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-costume-name-infinity-nan.sb3.tw-snapshot @@ -0,0 +1,35 @@ +// TW Snapshot +// Input SHA-256: dad2d51129eae742bdde75772afed267945ce57ccbc8890e504519ff6fd55318 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +runtime.ext_scratch3_looks._setCostume(target, "initial"); +yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, "m", null); +runtime.ext_scratch3_looks._setCostume(target, (1 / 0)); +if ((target.getCostumes()[target.currentCostume].name.toLowerCase() === "good".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass infinity costume name",}, b0, false, false, "x", null); +} +if (((target.currentCostume + 1) === 1)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass infinity costume number",}, b0, false, false, "z", null); +} +runtime.ext_scratch3_looks._setCostume(target, "initial"); +runtime.ext_scratch3_looks._setCostume(target, (1 / -0)); +if ((target.getCostumes()[target.currentCostume].name.toLowerCase() === "good".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -infinity costume name",}, b0, false, false, "E", null); +} +if (((target.currentCostume + 1) === 1)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -infinity costume number",}, b0, false, false, "G", null); +} +runtime.ext_scratch3_looks._setCostume(target, "initial"); +runtime.ext_scratch3_looks._setCostume(target, (0 / 0)); +if ((target.getCostumes()[target.currentCostume].name.toLowerCase() === "good".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass nan costume name",}, b0, false, false, "L", null); +} +if (((target.currentCostume + 1) === 1)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass nan costume number",}, b0, false, false, "O", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "N", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-for-each-in.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-for-each-in.sb3.tw-snapshot new file mode 100644 index 00000000000..ce167385193 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-for-each-in.sb3.tw-snapshot @@ -0,0 +1,134 @@ +// TW Snapshot +// Input SHA-256: 4a00d758e882b2fe0b57020459268c0db38afb7aee290e57f045a5dab2ece743 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["om$AKtHax/H0kJUzYbbi"]; +const b1 = stage.variables["7Oj/v$#js7a33uH`xGl;"]; +return function* genXYZ () { +b0.value = "no change"; +b1.value = 0; +var a0 = 0; while (a0 < 10) { a0++; b0.value = a0; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 10),"i = 10 (each 10)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 10),"dummy = 10 (each 10)"); +b0.value = "no change"; +b1.value = 0; +var a1 = 0; while (a1 < 1) { a1++; b0.value = a1; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 1),"i = 1 (each 1)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 1),"dummy = 1 (each 1)"); +b0.value = "no change"; +b1.value = 0; +var a2 = 0; while (a2 < 0) { a2++; b0.value = a2; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "no change".toLowerCase()),"i = no change (each 0)"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b1.value, 0),"dummy = 0 (each 0)"); +b0.value = "no change"; +b1.value = 0; +var a3 = 0; while (a3 < -5) { a3++; b0.value = a3; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "no change".toLowerCase()),"i = no change (each -5)"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b1.value, 0),"dummy = 0 (each -5)"); +b0.value = "no change"; +b1.value = 0; +var a4 = 0; while (a4 < 0) { a4++; b0.value = a4; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "no change".toLowerCase()),"i = no change (each aaaaaa)"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b1.value, 0),"dummy = 0 (each aaaaaa)"); +b0.value = "no change"; +b1.value = 0; +var a5 = 0; while (a5 < 5.9) { a5++; b0.value = a5; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 6),"i = 6 (each 5.9)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 6),"dummy = 6 (each 5.9)"); +b0.value = "no change"; +b1.value = 0; +var a6 = 0; while (a6 < 5.1) { a6++; b0.value = a6; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 6),"i = 6 (each 5.1)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 6),"dummy = 6 (each 5.1)"); +b0.value = "no change"; +b1.value = 0; +var a7 = 0; while (a7 < -0.1) { a7++; b0.value = a7; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "no change".toLowerCase()),"i = no change (each -0.1)"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b1.value, 0),"dummy = 0 (each -0.1)"); +b0.value = "no change"; +b1.value = 0; +var a8 = 0; while (a8 < 0.1) { a8++; b0.value = a8; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 1),"i = 1 (each 0.1)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 1),"dummy = 1 (each 0.1)"); +b0.value = "no change"; +var a9 = 0; while (a9 < 5) { a9++; b0.value = a9; +b0.value = 8; +b1.value = 9; +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 8),"i = 8 (each 5 w/set)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 9),"dummy = 9 (each 5 w/set)"); +b0.value = "no change"; +b1.value = 1; +var a10 = 0; while (a10 < 5) { a10++; b0.value = a10; +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b0.value, b1.value),"i = dummy (each 5 w/set+dummy check)"); +b1.value = ((+b1.value || 0) + 1); +b0.value = 9999; +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 9999),"i = 9999 (after each 5 w/set+dummy check)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 6),"dummy = 6 (after each 5 w/set+dummy check)"); +yield* thread.procedures["ZOK %s"]("ok"); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "O", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "Q", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "S", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "U", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-glide-negative-time.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-glide-negative-time.sb3.tw-snapshot new file mode 100644 index 00000000000..24acc11d952 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-glide-negative-time.sb3.tw-snapshot @@ -0,0 +1,43 @@ +// TW Snapshot +// Input SHA-256: 02a87b5a1b3b7a692c904422b1b22ea0fb6a7240ab3ca998a921674f4152b04e + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +thread.timer = timer(); +var a0 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a0) { +yield; +} +thread.timer = null; +thread.timer = timer(); +var a1 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a1) { +yield; +} +thread.timer = null; +if ((limitPrecision(target.x) === 100)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "m", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "n", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = runtime.getOpcodeFunction("motion_glidesecstoxy"); +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null); +target.setXY(0, 0); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +yield* executeInCompatibilityLayer({"SECS":-1,"X":100,"Y":0,}, b1, false, false, "h", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-glide-xy-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-glide-xy-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..349094412fa --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-glide-xy-NaN.sb3.tw-snapshot @@ -0,0 +1,19 @@ +// TW Snapshot +// Input SHA-256: 052a07292a98c770d3cdf1df2670a8eb2c4e488041187e45e7ffb6e8944013b6 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = runtime.getOpcodeFunction("motion_glidesecstoxy"); +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null); +target.setXY(-100, -100); +yield* executeInCompatibilityLayer({"SECS":0,"X":(0 / 0),"Y":100,}, b1, false, false, "b", null); +if ((limitPrecision(target.x) === 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "i", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "j", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "h", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-mathop-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-mathop-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..59e376d2266 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-mathop-NaN.sb3.tw-snapshot @@ -0,0 +1,37 @@ +// TW Snapshot +// Input SHA-256: 082b59a5b772f80c84bc6a846d9ea5023863d8f90c5b85e599b53fed7a9d6a46 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 8",}, b0, false, false, "j", null); +b1.value = (1 / 0); +if (((10 + (Math.sqrt(-1) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "R", null); +} +if (((10 + ((Math.round(Math.sin((Math.PI * (+b1.value || 0)) / 180) * 1e10) / 1e10) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "B", null); +} +if (((10 + ((Math.round(Math.cos((Math.PI * (+b1.value || 0)) / 180) * 1e10) / 1e10) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "D", null); +} +if (((10 + (tan((+b1.value || 0)) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "F", null); +} +if (((10 + (((Math.asin(2) * 180) / Math.PI) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "H", null); +} +if (((10 + (((Math.acos(2) * 180) / Math.PI) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "J", null); +} +if (((10 + (Math.log(-1) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "L", null); +} +if (((10 + ((Math.log(-1) / Math.LN10) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "O", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "N", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-negative-zero.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-negative-zero.sb3.tw-snapshot new file mode 100644 index 00000000000..8fdbb26b8f4 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-negative-zero.sb3.tw-snapshot @@ -0,0 +1,44 @@ +// TW Snapshot +// Input SHA-256: 392c8fcd9ce3e05cfb9ec1f39713073fca6c3a702fbd49697e2e496376e6b4f6 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"]((((1 / 0) || 0) === Infinity),"1/0"); +yield* thread.procedures["ZassertTrue %b %s"]((((1 / -0) || 0) === -Infinity),"1/-0"); +yield* thread.procedures["ZOK %s"]("ok"); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "i", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "k", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "m", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "o", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-operators-output-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-operators-output-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..042ff267e16 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-operators-output-NaN.sb3.tw-snapshot @@ -0,0 +1,27 @@ +// TW Snapshot +// Input SHA-256: 289d73b9be2b60f501e57768410029798d2dec7d971e5935e5f19fb2a9988169 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["k|@-`:^^Mo+E}$({|2/P"]; +const b2 = stage.variables["t2m05.oW;5f0=GL30@pV"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 4",}, b0, false, false, "g", null); +b1.value = (1 / 0); +b2.value = (-1 / 0); +if ((("" + (b1.value + b2.value)).toLowerCase() === "NaN".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "m", null); +} +if ((("" + ((+b1.value || 0) - (+b1.value || 0))).toLowerCase() === "NaN".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "n", null); +} +if ((("" + ((+b1.value || 0) * 0)).toLowerCase() === "NaN".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "o", null); +} +if ((("" + (0 / 0)).toLowerCase() === "NaN".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "q", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-operators.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-operators.sb3.tw-snapshot new file mode 100644 index 00000000000..410134f99b6 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-operators.sb3.tw-snapshot @@ -0,0 +1,165 @@ +// TW Snapshot +// Input SHA-256: 1142c0dcd16b015bae6b8df3e70e1e4572decc653e0c5f4af57a9a7313e8d458 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["Zassert %b %s"]((((0.1 + 0.2) || 0) === 0.30000000000000004),"adding must work w/ floating point errors"); +yield* thread.procedures["Zassert %b %s"]((((0.2 - -0.1) || 0) === 0.30000000000000004),"subtraction must work w/ floating point errors"); +yield* thread.procedures["Zassert %b %s"]((((0 - 5) || 0) === -5),"substraction should invert with empty right side"); +yield* thread.procedures["Zassert %b %s"]((((222 * 2) || 0) === 444),"multiplication must work"); +yield* thread.procedures["Zassert %b %s"]((((222 / 2) || 0) === 111),"division must work"); +yield* thread.procedures["Zassert %b %s"]((((100 / 0) || 0) === Infinity),"100/0 must equal Infinity"); +for (var a0 = 5; a0 > 0; a0--) { +yield* thread.procedures["Zassert %b %s"](!(randomInt(1, 10) < 1),"pick random should have a lower bound (inclusive)"); +yield* thread.procedures["Zassert %b %s"](!(randomInt(1, 10) > 10),"pick random should have an upper bound (inclusive)"); +yield* thread.procedures["Zassert %b %s"]((1 === 1),"pick random of range 0 should return either bound"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1, 2) || 0), 1), 0),"pick random w/ decimal bounds should return decimals"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1, 2) || 0), 1), 0),"pick random w/ decimal (.0) bounds should return decimals"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1, 2) || 0), 1), 0),"pick random w/ decimal (.0) bounds should return decimals"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1.1, 2) || 0), 1), 0),"pick random w/ decimal bounds should return decimals"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1, 2.1) || 0), 1), 0),"pick random w/ decimal bounds should return decimals"); +yield; +} +yield* thread.procedures["Zassert %b %s"]((1 > 0),"1 must be greater than 0"); +yield* thread.procedures["Zassert %b %s"](!(0 > 1),"0 must not be greater than 1"); +yield* thread.procedures["Zassert %b %s"]((0 < 1),"0 must be less than 1"); +yield* thread.procedures["Zassert %b %s"](!(1 < 0),"1 must not be greater than 1"); +yield* thread.procedures["Zassert %b %s"]((1 === 1),"1 must equal 1"); +yield* thread.procedures["Zassert %b %s"](!("hello".toLowerCase() === "world".toLowerCase()),"hello must not equal world"); +yield* thread.procedures["Zassert %b %s"](("hello".toLowerCase() === "hello".toLowerCase()),"hello must equal hello"); +yield* thread.procedures["Zassert %b %s"](("".toLowerCase() === "".toLowerCase()),"empty must equal empty"); +yield* thread.procedures["Zassert %b %s"](!(" ".toLowerCase() === "".toLowerCase()),"spaces must not be ignored in equal"); +yield* thread.procedures["Zassert %b %s"](("👌".toLowerCase() === "👌".toLowerCase()),"equal should support emoji"); +yield* thread.procedures["Zassert %b %s"](!(0.30000000000000004 === 0.3),"number comparison must be precise"); +yield* thread.procedures["Zassert %b %s"]((0.1 === 0.1),"number comparison should disregard following zeros"); +yield* thread.procedures["Zassert %b %s"]((0.1 === 0.1),"number comparison should disregard leading zeros"); +yield* thread.procedures["Zassert %b %s"](compareEqual((0 / 0), (0 / 0)),"number NaN must equal number NaN"); +yield* thread.procedures["Zassert %b %s"](!false,"empty negate must be true"); +yield* thread.procedures["Zassert %b %s"](!!!false,"negate true must be false"); +yield* thread.procedures["Zassert %b %s"](!!!!!!!false,"negates must be stackable to the moon"); +yield* thread.procedures["Zassert %b %s"]((("apple " + "banana").toLowerCase() === "apple banana".toLowerCase()),"join must join strings"); +yield* thread.procedures["Zassert %b %s"](((("apple")[1 - 1] || "").toLowerCase() === "a".toLowerCase()),"letter 1 of apple must be apple"); +yield* thread.procedures["Zassert %b %s"](((("apple")[0 - 1] || "").toLowerCase() === "".toLowerCase()),"letter 0 of apple must be empty"); +yield* thread.procedures["Zassert %b %s"](((("apple")[((0 - 1) | 0) - 1] || "").toLowerCase() === "".toLowerCase()),"letter -1 of apple must be empty"); +yield* thread.procedures["Zassert %b %s"](((("apple")[9999 - 1] || "").toLowerCase() === "".toLowerCase()),"letter 9999 of apple must be empty"); +yield* thread.procedures["Zassert %b %s"](("apple".length === 5),"length of apple must be 5"); +yield* thread.procedures["Zassert %b %s"](("".length === 0),"length of empty string must be 0"); +yield* thread.procedures["Zassert %b %s"](("apple".toLowerCase().indexOf("a".toLowerCase()) !== -1),"apple must contain a"); +yield* thread.procedures["Zassert %b %s"](!("apple".toLowerCase().indexOf("b".toLowerCase()) !== -1),"apple must not contain b"); +yield* thread.procedures["Zassert %b %s"](!("👌".toLowerCase().indexOf("👏".toLowerCase()) !== -1),"👌 must not contain 👏"); +yield* thread.procedures["Zassert %b %s"](("👌👌".toLowerCase().indexOf("👌".toLowerCase()) !== -1),"👌👌 must contain 👌"); +yield* thread.procedures["Zassert %b %s"](((mod(3, 4) || 0) === 3),"3 mod 4 must be 3"); +yield* thread.procedures["Zassert %b %s"](((mod(3, -4) || 0) === -1),"3 mod -4 must be -1"); +yield* thread.procedures["Zassert %b %s"](((mod(-3, 4) || 0) === 1),"-3 mod 4 must be 1"); +yield* thread.procedures["Zassert %b %s"](compareEqual(mod(3, 3), 0),"a number mod itself must be 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual(mod(-3, 3), 0),"a number mod it's positive inverse must be 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual(mod(3, -3), 0),"a number mod it's negative inverse must be 0"); +yield* thread.procedures["Zassert %b %s"]((("" + mod(3, 0)).toLowerCase() === "NaN".toLowerCase()),"any number mod 0 must be NaN"); +yield* thread.procedures["Zassert %b %s"](((mod(1.5, 1) || 0) === 0.5),"mod 1 must result in only decimal part"); +yield* thread.procedures["Zassert %b %s"](((mod(3.3, 1) || 0) === 0.2999999999999998),"3.3 mod 1 must have floating point errors"); +yield* thread.procedures["Zassert %b %s"]((Math.round(0) === 0),"rounding 0 must be 0"); +yield* thread.procedures["Zassert %b %s"]((Math.round(0.1) === 0),"rounding .1 must be 0"); +yield* thread.procedures["Zassert %b %s"]((Math.round(0.9) === 1),"rounding .9 must be 1"); +yield* thread.procedures["Zassert %b %s"]((Math.round(-0.5) === 0),"rounding -.5 must be 0"); +yield* thread.procedures["Zassert %b %s"]((Math.round(-0.1) === 0),"roudning -.1 must be 0"); +yield* thread.procedures["Zassert %b %s"]((Math.round(-0.51) === -1),"roudning -.51 must be -1"); +yield* thread.procedures["Zassert %b %s"](((+!false) === 1),"true must equal 1"); +yield* thread.procedures["Zassert %b %s"](((+!!false) === 0),"false must equal 0"); +yield* thread.procedures["Zassert %b %s"]((((9007199254740992 + 1) || 0) === 9007199254740992),"math should start breaking after 9007199254740991"); +yield* thread.procedures["Zassert %b %s"]((Math.abs(5) === 5),"absolute value of a position number should be itself"); +yield* thread.procedures["Zassert %b %s"]((Math.abs(-5) === 5),"absolute value of a negative number should be its inverse"); +yield* thread.procedures["Zassert %b %s"]((Math.floor(5.9) === 5),"floor of a number should round it down"); +yield* thread.procedures["Zassert %b %s"]((Math.ceil(5.9) === 6),"ceiling of a number should round it up"); +yield* thread.procedures["Zassert %b %s"](((Math.sqrt(4) || 0) === 2),"sqrt of 4 must be 2"); +yield* thread.procedures["Zassert %b %s"](((Math.sqrt(2) || 0) === 1.4142135623730951),"sqrt of 2 must be 1.4142135623730951"); +yield* thread.procedures["Zassert %b %s"]((Math.round((((Math.asin(0.5) * 180) / Math.PI) || 0)) === 30),"asin of .5 must be roughly 30"); +yield* thread.procedures["Zassert %b %s"](compareEqual(Math.log(1), 0),"ln 1 must be 0"); +yield* thread.procedures["Zassert %b %s"](((Math.log(2) || 0) === 0.6931471805599453),"ln 2 must be 0.69314..."); +yield* thread.procedures["Zassert %b %s"](((Math.log(2.718281828459045) || 0) === 1),"ln e must be 1"); +yield* thread.procedures["Zassert %b %s"](((Math.log(Math.exp(2)) || 0) === 2),"ln e^2 must be 2"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.log(1) / Math.LN10), 0),"log 1 must be 0"); +yield* thread.procedures["Zassert %b %s"]((((Math.log(2) / Math.LN10) || 0) === 0.30102999566398114),"log 2 must be 0.3010..."); +yield* thread.procedures["Zassert %b %s"]((((Math.log(10) / Math.LN10) || 0) === 1),"log 10 must be 1"); +yield* thread.procedures["Zassert %b %s"]((((Math.log(100) / Math.LN10) || 0) === 2),"log 100 must be 2"); +yield* thread.procedures["Zassert %b %s"]((Math.exp(1) === 2.718281828459045),"e ^ 1 must be 2.718281828459045"); +yield* thread.procedures["Zassert %b %s"]((Math.exp(0) === 1),"e ^ 0 must be 1"); +yield* thread.procedures["Zassert %b %s"](((10 ** 1) === 10),"10 ^ 1 must be 10"); +yield* thread.procedures["Zassert %b %s"](((10 ** 0) === 1),"10 ^ 0 must be 1"); +yield* thread.procedures["Zassert %b %s"](((10 ** 2) === 100),"10 ^ 2 must be 100"); +yield* thread.procedures["Zassert %b %s"](((+(0 === 50)) === (+(0 === 50))),"real false = real false"); +yield* thread.procedures["Zassert %b %s"](((+("".toLowerCase() === "".toLowerCase())) === (+("".toLowerCase() === "".toLowerCase()))),"real true = real true"); +yield* thread.procedures["Zassert %b %s"](("true".toLowerCase() === ("" + ("".toLowerCase() === "".toLowerCase())).toLowerCase()),"string true = real true"); +yield* thread.procedures["Zassert %b %s"](("false".toLowerCase() === ("" + (0 === 50)).toLowerCase()),"string false = real false"); +yield* thread.procedures["Zassert %b %s"]((("" + ("".toLowerCase() === "".toLowerCase())).toLowerCase() === "true".toLowerCase()),"real true = string true"); +yield* thread.procedures["Zassert %b %s"]((("" + (0 === 50)).toLowerCase() === "false".toLowerCase()),"real false = string false"); +yield* thread.procedures["Zassert %b %s"](((+(0 === 1)) === 0),"real false = string 0"); +yield* thread.procedures["Zassert %b %s"](((+(0 === 0)) === 1),"real true = string 1"); +yield* thread.procedures["Zassert %b %s"](compareEqual((0 === 1), (0 + 0)),"real false = number 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual((0 === 0), (1 + 0)),"real true = number 1"); +yield* thread.procedures["Zassert %b %s"](((((+("0x" + "12f3") || 0) + 0) || 0) === 4851),"positive hex"); +yield* thread.procedures["Zassert %b %s"](((((+("0o" + "127") || 0) + 0) || 0) === 87),"positive octal"); +yield* thread.procedures["Zassert %b %s"](((((+("0b" + "1010101") || 0) + 0) || 0) === 85),"positive binary"); +yield* thread.procedures["Zassert %b %s"](compareEqual(((+("-0x" + "123") || 0) + 0), 0),"negative hex is 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual(((+("-0o" + "123") || 0) + 0), 0),"negative octal is 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual(((+("-0b" + "10101") || 0) + 0), 0),"negative binary is 0"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * 57.7) / 180) * 1e10) / 1e10) || 0) === 0.8452618332),"sin 57.7"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * 0) / 180) * 1e10) / 1e10), 0),"sin 0"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * 90) / 180) * 1e10) / 1e10) || 0) === 1),"sin 90"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * 180) / 180) * 1e10) / 1e10), 0),"sin 180"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * 270) / 180) * 1e10) / 1e10) || 0) === -1),"sin 270"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * 360) / 180) * 1e10) / 1e10), 0),"sin 360"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * 450) / 180) * 1e10) / 1e10) || 0) === 1),"sin 450"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * -90) / 180) * 1e10) / 1e10) || 0) === -1),"sin -90"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * -180) / 180) * 1e10) / 1e10), 0),"sin -180"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * -270) / 180) * 1e10) / 1e10) || 0) === 1),"sin -270"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * -360) / 180) * 1e10) / 1e10), 0),"sin -360"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * -450) / 180) * 1e10) / 1e10) || 0) === -1),"sin -450"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * 57.7) / 180) * 1e10) / 1e10) || 0) === 0.5343523494),"cos 57.7"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * 0) / 180) * 1e10) / 1e10) || 0) === 1),"cos 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * 90) / 180) * 1e10) / 1e10), 0),"cos 90"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * 180) / 180) * 1e10) / 1e10) || 0) === -1),"cos 180"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * 270) / 180) * 1e10) / 1e10), 0),"cos 270"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * 360) / 180) * 1e10) / 1e10) || 0) === 1),"cos 360"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * 450) / 180) * 1e10) / 1e10), 0),"cos 450"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * -90) / 180) * 1e10) / 1e10), 0),"cos -90"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * -180) / 180) * 1e10) / 1e10) || 0) === -1),"cos -180"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * -270) / 180) * 1e10) / 1e10), 0),"cos -270"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * -360) / 180) * 1e10) / 1e10) || 0) === 1),"cos -360"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * -450) / 180) * 1e10) / 1e10), 0),"cos -450"); +yield* thread.procedures["ZOKAY"](); +retire(); return; +}; }) + +// Sprite1 Zassert %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assert__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOKAY +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OKAY () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "cL", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + "0"),}, b0, false, false, "aX", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "cM", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "a!", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + "0"),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "a%", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-preserve-order-after-stop-other-scripts.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-preserve-order-after-stop-other-scripts.sb3.tw-snapshot new file mode 100644 index 00000000000..d5352099960 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-preserve-order-after-stop-other-scripts.sb3.tw-snapshot @@ -0,0 +1,81 @@ +// TW Snapshot +// Input SHA-256: 33ae042ed2e2affa758cf695de33f44b075e96d01ccb919972d262517492f6fc + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["C7VGwqE9rvJgpw(oV^?E"]; +return function* genXYZ () { +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "3" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "2" }); +runtime.stopForTarget(target, thread); +b0.value = []; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "2" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "3" }); +thread.timer = timer(); +var a0 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a0) { +yield; +} +thread.timer = null; +if (((+listContents(b0) || 0) === 312)) { +yield* thread.procedures["ZOK %s"](""); +} else { +yield* thread.procedures["ZFAIL %s"](""); +} +retire(); return; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "f", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "h", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "j", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["C7VGwqE9rvJgpw(oV^?E"]; +return function* genXYZ () { +b0.value.push(1); +b0._monitorUpToDate = false; +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["C7VGwqE9rvJgpw(oV^?E"]; +return function* genXYZ () { +b0.value.push(2); +b0._monitorUpToDate = false; +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["C7VGwqE9rvJgpw(oV^?E"]; +return function* genXYZ () { +b0.value.push(3); +b0._monitorUpToDate = false; +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-procedure-definition-order.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-procedure-definition-order.sb3.tw-snapshot new file mode 100644 index 00000000000..63d4e6deecd --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-procedure-definition-order.sb3.tw-snapshot @@ -0,0 +1,28 @@ +// TW Snapshot +// Input SHA-256: 2979239837a20f2d91405b400ec98101ec8262f2e0b89b0f0204591c9dd9c25d + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZA"](); +retire(); return; +}; }) + +// Sprite1 ZA +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_A () { +yield* thread.procedures["ZOK %s"](""); +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "e", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-run-blocks-after-self-broadcast.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-run-blocks-after-self-broadcast.sb3.tw-snapshot new file mode 100644 index 00000000000..24dc9e4c3d5 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-run-blocks-after-self-broadcast.sb3.tw-snapshot @@ -0,0 +1,56 @@ +// TW Snapshot +// Input SHA-256: 9902bbdd6b9a5d5c25b5382a533e1b3a72ea1f5ca68709abf08a9e6af339f2c7 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables[")Vp94b3HO|$4At]V7XiJ"]; +const b1 = stage.variables["`NuUx`@:w=|8`D7S4l-t"]; +return function* genXYZ () { +b0.value = 0; +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables[")Vp94b3HO|$4At]V7XiJ"]; +const b1 = stage.variables["`NuUx`@:w=|8`D7S4l-t"]; +return function* genXYZ () { +if (compareEqual(b0.value, 0)) { +b0.value = 1; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +b1.value = 1; +} else { +if (((+b1.value || 0) === 1)) { +yield* thread.procedures["ZOK %s"](""); +} else { +yield* thread.procedures["ZFAIL %s"](""); +} +} +retire(); return; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "i", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "d", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "k", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "e", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-scripts-run-after-stop-all.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-scripts-run-after-stop-all.sb3.tw-snapshot new file mode 100644 index 00000000000..8a3a1131c49 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-scripts-run-after-stop-all.sb3.tw-snapshot @@ -0,0 +1,93 @@ +// TW Snapshot +// Input SHA-256: 53f9471a2e476b366db519bae1d739833c0210dd92ca501a29a3dfce9a1f960d + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "3loop" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["5*)/o6gQzEw)31Ah!j:j"]; +const b1 = stage.variables["sYUvu8`..xuGcWX3!B1k"]; +return function* genXYZ () { +while (!compareGreaterThan(b0.value, 2)) { +b0.value = ((+b0.value || 0) + 1); +yield; +} +if (((+b1.value || 0) === 1)) { +yield* thread.procedures["ZOK %s"](""); +} else { +if (compareEqual(b1.value, 0)) { +yield* thread.procedures["ZFAIL %s"]("variable 1 haven't been incremented"); +} else { +yield* thread.procedures["ZFAIL %s"]("variable 1 got incremented multiple times"); +} +} +retire(); return; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "f", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "d", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "h", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "e", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["sYUvu8`..xuGcWX3!B1k"]; +const b1 = stage.variables["5*)/o6gQzEw)31Ah!j:j"]; +return function* genXYZ () { +b0.value = 0; +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "2" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "3" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +runtime.stopAll(); +retire(); return; +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1loop" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["sYUvu8`..xuGcWX3!B1k"]; +return function* genXYZ () { +while (true) { +b0.value = ((+b0.value || 0) + 1); +yield; +} +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-stop-other-scripts-in-sprite.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-stop-other-scripts-in-sprite.sb3.tw-snapshot new file mode 100644 index 00000000000..e447f4aa379 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-stop-other-scripts-in-sprite.sb3.tw-snapshot @@ -0,0 +1,36 @@ +// TW Snapshot +// Input SHA-256: 1d077dfdf08990f391b64e59cc3b31530abe3b2aef12e54678743a1f74f99ae5 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "b", null); +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +runtime.stopForTarget(target, thread); +thread.timer = timer(); +var a0 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a0) { +yield; +} +thread.timer = null; +if (compareEqual(b1.value, 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "k", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "m", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "j", null); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +return function* genXYZ () { +b0.value = ((+b0.value || 0) + 1); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-string-functions.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-string-functions.sb3.tw-snapshot new file mode 100644 index 00000000000..275faa52ce0 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-string-functions.sb3.tw-snapshot @@ -0,0 +1,276 @@ +// TW Snapshot +// Input SHA-256: 0d7c7d4a267a29ff249f9314e87a7a7170870dc48175ffdba5a12fa48e8ba0a2 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["Ztest endsWith"](); +yield* thread.procedures["Ztest startsWith"](); +yield* thread.procedures["Ztest includes"](); +yield* thread.procedures["Ztest indexOf"](); +yield* thread.procedures["Ztest replace"](); +yield* thread.procedures["ZOKAY %s"]((("" + runtime.ioDevices.clock.projectTimer()) + " seconds")); +retire(); return; +}; }) + +// Sprite1 Ztest endsWith +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_endsWith () { +thread.procedures["W%s .endsWith( %s )"](12333,333); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must end with 333"); +thread.procedures["W%s .endsWith( %s )"](12333,33); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must end with 33"); +thread.procedures["W%s .endsWith( %s )"](12333,""); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must end with empty string"); +thread.procedures["W%s .endsWith( %s )"](12333,4); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "false".toLowerCase()),"12333 must not end with 4"); +thread.procedures["W%s .endsWith( %s )"](12333,123334); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "false".toLowerCase()),"12333 must not end with 123334"); +thread.procedures["W%s .endsWith( %s )"](12333,12333); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must end with itself"); +thread.procedures["W%s .includes( %s )"]("abc",""); +return ""; +}; }) + +// Sprite1 Ztest startsWith +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_startsWith () { +thread.procedures["W%s .startsWith( %s )"](12333,12333); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 12333"); +thread.procedures["W%s .startsWith( %s )"](12333,1233); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 1233"); +thread.procedures["W%s .startsWith( %s )"](12333,123); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 123"); +thread.procedures["W%s .startsWith( %s )"](12333,12); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 12"); +thread.procedures["W%s .startsWith( %s )"](12333,1); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 1"); +thread.procedures["W%s .startsWith( %s )"](12333,""); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with empty string"); +thread.procedures["W%s .startsWith( %s )"](12333,33); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "false".toLowerCase()),"12333 must not start with 33"); +return ""; +}; }) + +// Sprite1 Ztest includes +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_includes () { +thread.procedures["W%s .includes( %s )"]("abc",""); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include empty string"); +thread.procedures["W%s .includes( %s )"]("",""); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"empty string must include empty string"); +thread.procedures["W%s .includes( %s )"]("abc","abc"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include abc"); +thread.procedures["W%s .includes( %s )"]("abc","a"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include a"); +thread.procedures["W%s .includes( %s )"]("abc","b"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include b"); +thread.procedures["W%s .includes( %s )"]("abc","c"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include c"); +thread.procedures["W%s .includes( %s )"]("abc","ab"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include ab"); +thread.procedures["W%s .includes( %s )"]("abc","bc"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include bc"); +thread.procedures["W%s .includes( %s )"]("abc","aa"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "false".toLowerCase()),"abc must not include aa"); +return ""; +}; }) + +// Sprite1 Ztest indexOf +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_indexOf () { +thread.procedures["W%s .indexOf( %s )"](123,1); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 1),"index of 1 in 123 is 1"); +thread.procedures["W%s .indexOf( %s )"](123,2); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 2),"index of 2 in 123 is 2"); +thread.procedures["W%s .indexOf( %s )"](123,3); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 3),"index of 3 in 123 is 3"); +thread.procedures["W%s .indexOf( %s )"](123,"aaaa"); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === -1),"index of aaaa in 123 is -1"); +return ""; +}; }) + +// Sprite1 Ztest lastIndexOf +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function funXYZ_test_lastIndexOf () { +return ""; +}; }) + +// Sprite1 Ztest replace +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_replace () { +thread.procedures["W%s .replace( %s with %s )"](123456,345,"a"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "12a6".toLowerCase()),"replace expected 12a6"); +thread.procedures["W%s .replace( %s with %s )"](123,123,456); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 456),"replace expected 456"); +thread.procedures["W%s .replace( %s with %s )"](123,1234,456); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 123),"replace expected 123"); +return ""; +}; }) + +// Sprite1 Ztest split +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function funXYZ_test_split () { +return ""; +}; }) + +// Sprite1 ZOKAY %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OKAY_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "aq", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + "0"),}, b0, false, false, "C", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "as", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 W%s .endsWith( %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function funXYZ___endsWith____ (p0,p1) { +b0.value = []; +b1.value = ("" + p0).length; +for (var a0 = ("" + p1).length; a0 > 0; a0--) { +b0.value.unshift(((("" + p0))[(b1.value | 0) - 1] || "")); +b0._monitorUpToDate = false; +b1.value = (b1.value + -1); +} +b2.value = compareEqual(listContents(b0), p1); +return ""; +}; }) + +// Sprite1 Zassert %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assert__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 W%s .includes( %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +return function funXYZ___includes____ (p0,p1) { +if ((("" + p1).length === 0)) { +b0.value = "true"; +return ""; +} +b1.value = []; +b0.value = "false"; +b2.value = 0; +for (var a0 = ("" + p0).length; a0 > 0; a0--) { +b2.value = (b2.value + 1); +b1.value.push(((("" + p0))[(b2.value | 0) - 1] || "")); +b1._monitorUpToDate = false; +if ((b1.value.length > ("" + p1).length)) { +b1.value.shift(); +b1._monitorUpToDate = false; +} +if (compareEqual(listContents(b1), p1)) { +b0.value = "true"; +return ""; +} +} +return ""; +}; }) + +// Sprite1 W%s .startsWith( %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function funXYZ___startsWith____ (p0,p1) { +b0.value = []; +b1.value = 0; +for (var a0 = ("" + p1).length; a0 > 0; a0--) { +b1.value = (b1.value + 1); +b0.value.push(((("" + p0))[(b1.value | 0) - 1] || "")); +b0._monitorUpToDate = false; +} +b2.value = compareEqual(listContents(b0), p1); +return ""; +}; }) + +// Sprite1 W%s .indexOf( %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +return function funXYZ___indexOf____ (p0,p1) { +b0.value = []; +b1.value = -1; +b2.value = 0; +for (var a0 = ("" + p0).length; a0 > 0; a0--) { +b2.value = (b2.value + 1); +b0.value.push(((("" + p0))[(b2.value | 0) - 1] || "")); +b0._monitorUpToDate = false; +if ((b0.value.length > ("" + p1).length)) { +b0.value.shift(); +b0._monitorUpToDate = false; +} +if (compareEqual(listContents(b0), p1)) { +b1.value = (b2.value - (("" + p1).length - 1)); +return ""; +} +} +return ""; +}; }) + +// Sprite1 W%s .replace( %s with %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:templ-list"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +const b3 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +return function funXYZ___replace___with___ (p0,p1,p2) { +b0.value = []; +b1.value = []; +b2.value = ""; +b3.value = 0; +for (var a0 = ("" + p0).length; a0 > 0; a0--) { +b3.value = (b3.value + 1); +b0.value.push(((("" + p0))[(b3.value | 0) - 1] || "")); +b0._monitorUpToDate = false; +if ((b0.value.length > ("" + p1).length)) { +b0.value.shift(); +b0._monitorUpToDate = false; +} +b1.value.push(((("" + p0))[(b3.value | 0) - 1] || "")); +b1._monitorUpToDate = false; +if (compareEqual(listContents(b0), p1)) { +for (var a1 = ("" + p1).length; a1 > 0; a1--) { +b1.value.pop(); +b1._monitorUpToDate = false; +} +b2.value = (("" + b2.value) + listContents(b1)); +b2.value = (("" + b2.value) + ("" + p2)); +b1.value = []; +} +} +b2.value = (("" + b2.value) + listContents(b1)); +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "bY", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + "0"),}, b0, false, false, "=", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "b!", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/forkphorus-tangent.sb3.tw-snapshot b/test/snapshot/__snapshots__/forkphorus-tangent.sb3.tw-snapshot new file mode 100644 index 00000000000..b2ccf9ce3a3 --- /dev/null +++ b/test/snapshot/__snapshots__/forkphorus-tangent.sb3.tw-snapshot @@ -0,0 +1,56 @@ +// TW Snapshot +// Input SHA-256: 1446684578b41ff41cf29fbe14696ef717cca636e8d46babd7d9dec6df723a33 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 15",}, b0, false, false, "p", null); +if (compareEqual(tan(0), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 0",}, b0, false, false, "O", null); +} +if (((tan(90) || 0) === Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 90",}, b0, false, false, "G", null); +} +if (compareEqual(tan(180), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 180",}, b0, false, false, "I", null); +} +if (((tan(270) || 0) === -Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 270",}, b0, false, false, "K", null); +} +if (compareEqual(tan(360), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 360",}, b0, false, false, "M", null); +} +if (((tan(450) || 0) === Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 450",}, b0, false, false, "Q", null); +} +if (compareEqual(tan(540), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 540",}, b0, false, false, "S", null); +} +if (((tan(630) || 0) === -Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 630",}, b0, false, false, "U", null); +} +if (compareEqual(tan(720), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 720",}, b0, false, false, "W", null); +} +if (((tan(810) || 0) === Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 810",}, b0, false, false, "Y", null); +} +if (((tan(-90) || 0) === -Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -90",}, b0, false, false, "0", null); +} +if (compareEqual(tan(-180), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -180",}, b0, false, false, "2", null); +} +if (((tan(-270) || 0) === Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -270",}, b0, false, false, "4", null); +} +if (compareEqual(tan(-360), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -360",}, b0, false, false, "6", null); +} +if (((tan(-450) || 0) === -Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -450",}, b0, false, false, "9", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "8", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/tw-loop-custom-reporter.sb3.tw-snapshot b/test/snapshot/__snapshots__/tw-loop-custom-reporter.sb3.tw-snapshot deleted file mode 100644 index a606d8595fd..00000000000 --- a/test/snapshot/__snapshots__/tw-loop-custom-reporter.sb3.tw-snapshot +++ /dev/null @@ -1,27 +0,0 @@ -// TW Snapshot -// Input SHA-256: 360d8b29e0e690dda9e91faed6881057d1f38d98258ed8e11c75bdd30536b560 - -// Sprite1 script -(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); -const b0 = runtime.getOpcodeFunction("looks_say"); -const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; -return function* genXYZ () { -yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, null, null); -b1.value = 0; -for (var a0 = (+thread.procedures["Zblock name"]() || 0); a0 >= 0.5; a0--) { -b1.value = ((+b1.value || 0) + 1); -yield; -} -if (((+b1.value || 0) === 4)) { -yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, null, null); -} -yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, null, null); -retire(); return; -}; }) - -// Sprite1 block name -(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); -return function funXYZ_block_name () { -return 4; -return ""; -}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-105-contains.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-105-contains.sb3.tw-snapshot new file mode 100644 index 00000000000..ba4fc637e92 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-105-contains.sb3.tw-snapshot @@ -0,0 +1,45 @@ +// TW Snapshot +// Input SHA-256: d641b68a89119171eff5d36de1bd4f59b1649acc5ae55803fb0b797b636f52bb + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"](("apple".toLowerCase().indexOf("aPPle".toLowerCase()) !== -1),"apple contains aPPle"); +yield* thread.procedures["ZassertTrue %b %s"](("APPLE".toLowerCase().indexOf("app".toLowerCase()) !== -1),"APPLE contains app"); +yield* thread.procedures["ZassertTrue %b %s"](("appLe".toLowerCase().indexOf("LE".toLowerCase()) !== -1),"appLe contains LE"); +yield* thread.procedures["ZOK %s"]("ok"); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "n", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-112.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-112.sb3.tw-snapshot new file mode 100644 index 00000000000..babf8baf6d1 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-112.sb3.tw-snapshot @@ -0,0 +1,45 @@ +// TW Snapshot +// Input SHA-256: ff616461f1a16504b3a7be65eeecfdd29d31e897c43157fbd51370f72458852d + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +runtime.ext_scratch3_looks._setCostume(target, "costume2"); +runtime.ext_scratch3_looks._setCostume(target, (" " + "")); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 2),"costume should not change"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "n", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-263-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-263-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..acc5b25aebf --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-263-NaN.sb3.tw-snapshot @@ -0,0 +1,48 @@ +// TW Snapshot +// Input SHA-256: 67ab3b26c771f54d4181fa85a76430fdb4603a171c36a918cce1374c89bf9c23 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["rL_u6{W`ET;GKBRHZrag"]; +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"]((("" + (0 / 0)).toLowerCase() === "NaN".toLowerCase()),"0/0"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual((0 / 0), (0 / 0)),"NaN == NaN"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(Math.sqrt(-100), (0 / 0)),"sqrt negative"); +b0.value = (0 / 0); +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "NaN".toLowerCase()),"NaN storable in variables"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "n", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "r", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "t", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-264-setCostume.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-264-setCostume.sb3.tw-snapshot new file mode 100644 index 00000000000..1bc3f57e06e --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-264-setCostume.sb3.tw-snapshot @@ -0,0 +1,75 @@ +// TW Snapshot +// Input SHA-256: 801a8e9ac5e607f022601f2eda4bddf37b29c30627f0e24864c7b0f9cf7b65f9 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["G3sNM{+Wa29PviNsXl~;"]; +return function* genXYZ () { +b0.value = "4"; +runtime.ext_scratch3_looks._setCostume(target, b0.value); +yield* thread.procedures["ZassertTrue %b %s"](((+target.getCostumes()[target.currentCostume].name || 0) === 4),"cn=4"); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 2),"c#=2"); +b0.value = 3; +runtime.ext_scratch3_looks._setCostume(target, b0.value); +yield* thread.procedures["ZassertTrue %b %s"]((target.getCostumes()[target.currentCostume].name.toLowerCase() === "costume3".toLowerCase()),"cn=costume3"); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 3),"c#=3"); +b0.value = ("" + "4"); +runtime.ext_scratch3_looks._setCostume(target, b0.value); +yield* thread.procedures["ZassertTrue %b %s"](((+target.getCostumes()[target.currentCostume].name || 0) === 4),"cn=4"); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 2),"c#=2"); +b0.value = (4 * 1); +runtime.ext_scratch3_looks._setCostume(target, b0.value); +yield* thread.procedures["ZassertTrue %b %s"]((target.getCostumes()[target.currentCostume].name.toLowerCase() === "costume4".toLowerCase()),"cn=costume4"); +yield* thread.procedures["ZassertTrue %b %s"](((target.currentCostume + 1) === 4),"c#=4"); +b0.value = "4"; +runtime.ext_scratch3_looks._setBackdrop(stage, b0.value); +yield* thread.procedures["ZassertTrue %b %s"](((+stage.getCostumes()[stage.currentCostume].name || 0) === 4),"bn=4"); +yield* thread.procedures["ZassertTrue %b %s"](((stage.currentCostume + 1) === 2),"b#=2"); +b0.value = 3; +runtime.ext_scratch3_looks._setBackdrop(stage, b0.value); +yield* thread.procedures["ZassertTrue %b %s"]((stage.getCostumes()[stage.currentCostume].name.toLowerCase() === "backdrop3".toLowerCase()),"cn=backdrop3"); +yield* thread.procedures["ZassertTrue %b %s"](((stage.currentCostume + 1) === 3),"c#=3"); +b0.value = ("" + "4"); +runtime.ext_scratch3_looks._setBackdrop(stage, b0.value); +yield* thread.procedures["ZassertTrue %b %s"](((+stage.getCostumes()[stage.currentCostume].name || 0) === 4),"bn=4"); +yield* thread.procedures["ZassertTrue %b %s"](((stage.currentCostume + 1) === 2),"b#=2"); +b0.value = (4 * 1); +runtime.ext_scratch3_looks._setBackdrop(stage, b0.value); +yield* thread.procedures["ZassertTrue %b %s"]((stage.getCostumes()[stage.currentCostume].name.toLowerCase() === "backdrop4".toLowerCase()),"bn=backdrop4"); +yield* thread.procedures["ZassertTrue %b %s"](((stage.currentCostume + 1) === 4),"b#=4"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "I", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "K", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "M", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "O", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-285-variable-id-name-desync.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-285-variable-id-name-desync.sb3.tw-snapshot new file mode 100644 index 00000000000..95718123ec2 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-285-variable-id-name-desync.sb3.tw-snapshot @@ -0,0 +1,44 @@ +// TW Snapshot +// Input SHA-256: 1accbfd57a291524a062413a9c361d51e94ac5555fd3d861dd2d56806cd7e8c7 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["T{7z:Z^j(zfah+5ca3R0"]; +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 33),"uses ID"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "h", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "j", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "l", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "n", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-56-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-56-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..c19a254e669 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-56-NaN.sb3.tw-snapshot @@ -0,0 +1,47 @@ +// TW Snapshot +// Input SHA-256: 930b81005746fcf09490be69206cf92f6b882a8d4d66ef9cfa19139090131aad + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "+") || 0)) || 0) === 5),1); +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "-") || 0)) || 0) === 5),2); +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "x") || 0)) || 0) === 5),3); +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "-=-2398749") || 0)) || 0) === 5),4); +yield* thread.procedures["ZassertTrue %b %s"]((((5 + (+("" + "") || 0)) || 0) === 5),5); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "A", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "g", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "C", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "l", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "n", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-58-list-reference.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-58-list-reference.sb3.tw-snapshot new file mode 100644 index 00000000000..7af7a095173 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-58-list-reference.sb3.tw-snapshot @@ -0,0 +1,60 @@ +// TW Snapshot +// Input SHA-256: 95f7dfd29f2a3aec8027d03eab202b439a7630a1ee6b9a7cf534c7d971e41ef7 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables[")@7t1F9WM1F[_jBWx]7["]; +const b1 = stage.variables[",VHjOaLurDh*^;8kZ~I?"]; +return function* genXYZ () { +b0.value = []; +b1.value = []; +b0.value.push(3); +b0._monitorUpToDate = false; +b0.value.push(2); +b0._monitorUpToDate = false; +b0.value.push(8); +b0._monitorUpToDate = false; +b0.value.push(4); +b0._monitorUpToDate = false; +b1.value.push(listContents(b0)); +b1._monitorUpToDate = false; +b0.value = []; +yield* thread.procedures["ZassertTrue %b %s"]((b1.value.length === 1),"output length = 1"); +yield* thread.procedures["ZassertTrue %b %s"]((b0.value.length === 0),"data length = 0"); +yield* thread.procedures["ZassertTrue %b %s"](((+(b1.value[1 - 1] ?? "") || 0) === 3284),"output item 1"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "n", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-66-insert.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-66-insert.sb3.tw-snapshot new file mode 100644 index 00000000000..874b944bb1d --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-66-insert.sb3.tw-snapshot @@ -0,0 +1,54 @@ +// TW Snapshot +// Input SHA-256: 6bac3cd99997a7deae133a560824b5dc3801b8e7e41ff3f9daab8fd6282f890f + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["$h5KnZ-ePA3NOi=];]FX"]; +return function* genXYZ () { +b0.value = []; +b0.value.unshift("a"); +b0._monitorUpToDate = false; +listInsert(b0, 2, "b"); +listInsert(b0, 3, "c"); +yield* thread.procedures["ZassertTrue %b %s"]((b0.value.length === 3),"length is 3"); +yield* thread.procedures["ZassertTrue %b %s"]((("" + (b0.value[1 - 1] ?? "")).toLowerCase() === "a".toLowerCase()),"1=a"); +yield* thread.procedures["ZassertTrue %b %s"]((("" + (b0.value[2 - 1] ?? "")).toLowerCase() === "b".toLowerCase()),"2=b"); +yield* thread.procedures["ZassertTrue %b %s"]((("" + (b0.value[3 - 1] ?? "")).toLowerCase() === "c".toLowerCase()),"3=c"); +b0.value = []; +yield* thread.procedures["ZassertTrue %b %s"]((b0.value.length === 0),"length is 0"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "l", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "n", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "p", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "r", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-70.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-70.sb3.tw-snapshot new file mode 100644 index 00000000000..ae6ab5f0f70 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-70.sb3.tw-snapshot @@ -0,0 +1,43 @@ +// TW Snapshot +// Input SHA-256: 25ae3486d45378eb1c50784721d62d71d790c4687871f5961f731f1880137db2 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"](compareEqual((("0123")[1 - 1] || ""), 0),"letter 1 of 0123 is 0"); +yield* thread.procedures["ZOK %s"](""); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "h", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "j", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "l", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "n", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-and-or-not-cast-to-boolean.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-and-or-not-cast-to-boolean.sb3.tw-snapshot new file mode 100644 index 00000000000..e1ae77aaba6 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-and-or-not-cast-to-boolean.sb3.tw-snapshot @@ -0,0 +1,27 @@ +// TW Snapshot +// Input SHA-256: 7bc7268ef7d0d00b445b003aa683b39bcdb3c4c1d4bb7ae03679f553ad22f5a6 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["q9l+ZDG${I3p$=:TPs`3"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 3",}, b0, false, false, "f", null); +if ((("_" + ("" + (toBoolean((b1.value[2 - 1] ?? "")) && toBoolean((b1.value[2 - 1] ?? ""))))).toLowerCase() === "_true".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "m", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "n", null); +} +if ((("_" + ("" + (toBoolean((b1.value[1 - 1] ?? "")) || toBoolean((b1.value[2 - 1] ?? ""))))).toLowerCase() === "_true".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "q", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "r", null); +} +if (!toBoolean((b1.value[1 - 1] ?? ""))) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "v", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "w", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "u", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-befunge-eratosthenes.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-befunge-eratosthenes.sb3.tw-snapshot new file mode 100644 index 00000000000..5329a8d105f --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-befunge-eratosthenes.sb3.tw-snapshot @@ -0,0 +1,442 @@ +// TW Snapshot +// Input SHA-256: 81139c5bfe7cf38a74769e99279d2d211e5acb5dbc301dbd2bae79a6676015a3 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["Wcopy input"](); +yield* thread.procedures["Zbefunge"](); +retire(); return; +}; }) + +// Sprite1 Wcopy input +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-P-list"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-input-list"]; +return function* genXYZ_copy_input () { +b0.value = []; +b1.value = 0; +for (var a0 = b2.value.length; a0 > 0; a0--) { +b1.value = ((+b1.value || 0) + 1); +b0.value.push((b2.value[(b1.value | 0) - 1] ?? "")); +b0._monitorUpToDate = false; +if (isStuck()) yield; +} +return ""; +}; }) + +// Sprite1 Zbefunge +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-px-"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-py-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-direction-"]; +const b3 = runtime.getSpriteTargetByName("directions"); +const b4 = b3 && b3.lookupVariableByNameAndType("RIGHT", "", true); +const b5 = stage.variables["o4+OyKx[M=quu6p{=kRl-mem-list"]; +const b6 = stage.variables["4s|,s}H*n$XE+1ez}%eC"]; +return function* genXYZ_befunge () { +b0.value = 1; +b1.value = 1; +b2.value = (b4 ? b4.value : 0); +b5.value = []; +b6.value = []; +yield* thread.procedures["Wget max length"](); +while (true) { +yield* thread.procedures["Zstep"](); +yield; +} +return ""; +}; }) + +// Sprite1 Wget max length +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-max length-"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-input-list"]; +return function* genXYZ_get_max_length () { +b0.value = 0; +b1.value = 0; +for (var a0 = b2.value.length; a0 > 0; a0--) { +b1.value = ((+b1.value || 0) + 1); +if (compareGreaterThan(("" + (b2.value[(b1.value | 0) - 1] ?? "")).length, b0.value)) { +b0.value = ("" + (b2.value[(b1.value | 0) - 1] ?? "")).length; +} +if (isStuck()) yield; +} +return ""; +}; }) + +// Sprite1 Zstep +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-char-"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-P-list"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-py-"]; +const b3 = stage.variables["o4+OyKx[M=quu6p{=kRl-px-"]; +const b4 = stage.variables["o4+OyKx[M=quu6p{=kRl-direction-"]; +const b5 = runtime.getSpriteTargetByName("directions"); +const b6 = b5 && b5.lookupVariableByNameAndType("RIGHT", "", true); +const b7 = b5 && b5.lookupVariableByNameAndType("LEFT", "", true); +const b8 = b5 && b5.lookupVariableByNameAndType("UP", "", true); +const b9 = b5 && b5.lookupVariableByNameAndType("DOWN", "", true); +const b10 = stage.variables["o4+OyKx[M=quu6p{=kRl-pop-list"]; +const b11 = stage.variables["o4+OyKx[M=quu6p{=kRl-result-"]; +const b12 = stage.variables["o4+OyKx[M=quu6p{=kRl-mem-list"]; +const b13 = stage.variables["4s|,s}H*n$XE+1ez}%eC"]; +const b14 = stage.variables["o4+OyKx[M=quu6p{=kRl-ascii-list"]; +const b15 = stage.variables["o4+OyKx[M=quu6p{=kRl-ascii2-list"]; +const b16 = stage.variables["o4+OyKx[M=quu6p{=kRl-numbers-list"]; +return function* genXYZ_step () { +b0.value = ((("" + listGet(b1.value, b2.value)))[((+b3.value) | 0) - 1] || ""); +if ((b0.value.toLowerCase() === ">".toLowerCase())) { +b4.value = (b6 ? b6.value : 0); +} +if ((b0.value.toLowerCase() === "<".toLowerCase())) { +b4.value = (b7 ? b7.value : 0); +} +if ((b0.value.toLowerCase() === "^".toLowerCase())) { +b4.value = (b8 ? b8.value : 0); +} +if ((b0.value.toLowerCase() === "v".toLowerCase())) { +b4.value = (b9 ? b9.value : 0); +} +if ((b0.value.toLowerCase() === "?".toLowerCase())) { +b4.value = randomInt(1, 4); +} +if ((b0.value.toLowerCase() === "@".toLowerCase())) { +yield* thread.procedures["Zexit & verify"](); +} +if ((("" + b0.value).toLowerCase() === "+".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](((+(b10.value[1 - 1] ?? "") || 0) + (+(b10.value[2 - 1] ?? "") || 0))); +} +if ((("" + b0.value).toLowerCase() === "-".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](((+(b10.value[2 - 1] ?? "") || 0) - (+(b10.value[1 - 1] ?? "") || 0))); +} +if ((("" + b0.value).toLowerCase() === "*".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](((+(b10.value[2 - 1] ?? "") || 0) * (+(b10.value[1 - 1] ?? "") || 0))); +} +if ((("" + b0.value).toLowerCase() === "/".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](Math.floor((((+(b10.value[2 - 1] ?? "") || 0) / (+(b10.value[1 - 1] ?? "") || 0)) || 0))); +} +if ((("" + b0.value).toLowerCase() === "%".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"](mod((+(b10.value[2 - 1] ?? "") || 0), (+(b10.value[1 - 1] ?? "") || 0))); +} +if ((("" + b0.value).toLowerCase() === "!".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +thread.procedures["Zpush bool %b"](compareEqual((b10.value[1 - 1] ?? ""), 0)); +} +if ((("" + b0.value).toLowerCase() === "`".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush bool %b"](compareGreaterThan((b10.value[2 - 1] ?? ""), (b10.value[1 - 1] ?? ""))); +} +if ((("" + b0.value).toLowerCase() === "_".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +if ((compareEqual((b10.value[1 - 1] ?? ""), 0) || (("" + (b10.value[1 - 1] ?? "")).toLowerCase() === "".toLowerCase()))) { +b4.value = (b6 ? b6.value : 0); +} else { +b4.value = (b7 ? b7.value : 0); +} +} +if ((("" + b0.value).toLowerCase() === "|".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +if ((compareEqual((b10.value[1 - 1] ?? ""), 0) || (("" + (b10.value[1 - 1] ?? "")).toLowerCase() === "".toLowerCase()))) { +b4.value = (b9 ? b9.value : 0); +} else { +b4.value = (b8 ? b8.value : 0); +} +} +if ((("" + b0.value).toLowerCase() === "\"".toLowerCase())) { +yield* thread.procedures["Znext char"](); +while (!(((("" + listGet(b1.value, b2.value)))[((+b3.value) | 0) - 1] || "").toLowerCase() === "\"".toLowerCase())) { +yield* thread.procedures["Wascii to number %s"](((("" + listGet(b1.value, b2.value)))[((+b3.value) | 0) - 1] || "")); +thread.procedures["Zpush %n"](b11.value); +yield* thread.procedures["Znext char"](); +yield; +} +} +if ((("" + b0.value).toLowerCase() === ":".toLowerCase())) { +thread.procedures["Zpush %n"]((b12.value[b12.value.length - 1] ?? "")); +} +if ((("" + b0.value).toLowerCase() === "\\".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +thread.procedures["Zpush %n"]((b10.value[1 - 1] ?? "")); +thread.procedures["Zpush %n"]((b10.value[2 - 1] ?? "")); +} +if ((("" + b0.value).toLowerCase() === "$".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +} +if ((("" + b0.value).toLowerCase() === ".".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +b13.value.push((b10.value[1 - 1] ?? "")); +b13._monitorUpToDate = false; +} +if ((("" + b0.value).toLowerCase() === ",".toLowerCase())) { +yield* thread.procedures["Zpop %n"](1); +yield* thread.procedures["ZFAIL %s"](("did not expect ascii output: " + ("" + (b14.value[(((+(b10.value[1 - 1] ?? "") || 0) + 1) | 0) - 1] ?? "")))); +} +if ((("" + b0.value).toLowerCase() === "#".toLowerCase())) { +yield* thread.procedures["Znext char"](); +} +if ((("" + b0.value).toLowerCase() === "g".toLowerCase())) { +yield* thread.procedures["Zpop %n"](2); +yield* thread.procedures["Zascii to number but it lies %s"](((("" + (b1.value[(((+(b10.value[1 - 1] ?? "") || 0) + 1) | 0) - 1] ?? "")))[(((+(b10.value[2 - 1] ?? "") || 0) + 1) | 0) - 1] || "")); +thread.procedures["Zpush %n"](b11.value); +} +if ((("" + b0.value).toLowerCase() === "p".toLowerCase())) { +yield* thread.procedures["Zpop %n"](3); +listReplace(b10, 1, ((+(b10.value[1 - 1] ?? "") || 0) + 1)); +listReplace(b10, 2, ((+(b10.value[2 - 1] ?? "") || 0) + 1)); +if (compareLessThan(b1.value.length, (b10.value[1 - 1] ?? ""))) { +while (!compareEqual(b1.value.length, (b10.value[1 - 1] ?? ""))) { +b1.value.push(""); +b1._monitorUpToDate = false; +yield; +} +} +if (compareLessThan(("" + listGet(b1.value, (b10.value[1 - 1] ?? ""))).length, (b10.value[2 - 1] ?? ""))) { +while (!compareEqual(("" + listGet(b1.value, (b10.value[1 - 1] ?? ""))).length, (b10.value[2 - 1] ?? ""))) { +listReplace(b1, (b10.value[1 - 1] ?? ""), (("" + listGet(b1.value, (b10.value[1 - 1] ?? ""))) + " ")); +yield; +} +} +yield* thread.procedures["Winsert %s %n %s"](listGet(b1.value, (b10.value[1 - 1] ?? "")),(b10.value[2 - 1] ?? ""),(b15.value[(((+(b10.value[3 - 1] ?? "") || 0) + 1) | 0) - 1] ?? "")); +listReplace(b1, (b10.value[1 - 1] ?? ""), b11.value); +} +if ((("" + b0.value).toLowerCase() === "&".toLowerCase())) { +yield* thread.procedures["ZFAIL %s"]("unexpected ask for integer input"); +} +if ((("" + b0.value).toLowerCase() === "~".toLowerCase())) { +yield* thread.procedures["ZFAIL %s"]("unexpected ask for ascii input"); +} +if (listContains(b16, b0.value)) { +thread.procedures["Zpush %n"](b0.value); +} +yield* thread.procedures["Znext char"](); +return ""; +}; }) + +// Sprite1 Zexit & verify +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["4s|,s}H*n$XE+1ez}%eC"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b2 = stage.variables["f]9Ph]^v5P2CT7ju($Qb"]; +return function* genXYZ_exit___verify () { +yield* thread.procedures["ZassertTrue %b %s"]((b0.value.length === 22),"should output 22 items"); +b1.value = 0; +for (var a0 = b0.value.length; a0 > 0; a0--) { +b1.value = ((+b1.value || 0) + 1); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(listGet(b0.value, b1.value), listGet(b2.value, b1.value)),("item " + (("" + b1.value) + " should match expected output"))); +yield; +} +yield* thread.procedures["ZOKAY %s"]((("" + runtime.ioDevices.clock.projectTimer()) + " seconds")); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 Zpop %n +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-pop-list"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-mem-list"]; +return function* genXYZ_pop_ (p0) { +b0.value = []; +for (var a0 = (+p0 || 0); a0 >= 0.5; a0--) { +if ((b1.value.length > 0)) { +b0.value.push((b1.value[b1.value.length - 1] ?? "")); +b0._monitorUpToDate = false; +b1.value.pop(); +b1._monitorUpToDate = false; +} else { +b0.value.push(0); +b0._monitorUpToDate = false; +} +yield; +} +return ""; +}; }) + +// Sprite1 Zpush %n +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-mem-list"]; +return function funXYZ_push_ (p0) { +b0.value.push(p0); +b0._monitorUpToDate = false; +return ""; +}; }) + +// Sprite1 Zpush bool %b +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function funXYZ_push_bool_ (p0) { +if (toBoolean(p0)) { +thread.procedures["Zpush %n"](1); +} else { +thread.procedures["Zpush %n"](0); +} +return ""; +}; }) + +// Sprite1 Znext char +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-direction-"]; +const b1 = runtime.getSpriteTargetByName("directions"); +const b2 = b1 && b1.lookupVariableByNameAndType("RIGHT", "", true); +const b3 = stage.variables["o4+OyKx[M=quu6p{=kRl-px-"]; +const b4 = b1 && b1.lookupVariableByNameAndType("LEFT", "", true); +const b5 = b1 && b1.lookupVariableByNameAndType("UP", "", true); +const b6 = stage.variables["o4+OyKx[M=quu6p{=kRl-py-"]; +const b7 = b1 && b1.lookupVariableByNameAndType("DOWN", "", true); +const b8 = runtime.getOpcodeFunction("sensing_askandwait"); +const b9 = stage.variables["o4+OyKx[M=quu6p{=kRl-P-list"]; +const b10 = stage.variables["o4+OyKx[M=quu6p{=kRl-max length-"]; +return function* genXYZ_next_char () { +if (compareEqual(b0.value, (b2 ? b2.value : 0))) { +b3.value = ((+b3.value || 0) + 1); +} else { +if (compareEqual(b0.value, (b4 ? b4.value : 0))) { +b3.value = ((+b3.value || 0) + -1); +} else { +if (compareEqual(b0.value, (b5 ? b5.value : 0))) { +b6.value = ((+b6.value || 0) + -1); +} else { +if (compareEqual(b0.value, (b7 ? b7.value : 0))) { +b6.value = ((+b6.value || 0) + 1); +} else { +yield* executeInCompatibilityLayer({"QUESTION":("ERROR: Unkown direction (" + (("" + b0.value) + ")")),}, b8, false, false, "/", null); +runtime.stopAll(); +retire(); yield; +} +} +} +} +if (compareGreaterThan(b6.value, b9.value.length)) { +b6.value = 1; +} +if (compareLessThan(b6.value, 0)) { +b6.value = b9.value.length; +} +if (compareGreaterThan(b3.value, b10.value)) { +b3.value = 1; +} +if (compareLessThan(b3.value, 0)) { +b3.value = b10.value; +} +return ""; +}; }) + +// Sprite1 Wascii to number %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-costumes-list"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-result-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b3 = stage.variables["o4+OyKx[M=quu6p{=kRl-ascii-list"]; +return function* genXYZ_ascii_to_number_ (p0) { +if (listContains(b0, p0)) { +runtime.ext_scratch3_looks._setCostume(target, p0); +if (((target.currentCostume + 1) > 26)) { +b1.value = ((target.currentCostume + 1) + 38); +} else { +b1.value = ((target.currentCostume + 1) + 96); +} +} else { +b2.value = 0; +for (var a0 = b3.value.length; a0 > 0; a0--) { +b2.value = ((+b2.value || 0) + 1); +if (compareEqual((b3.value[(b2.value | 0) - 1] ?? ""), p0)) { +b1.value = (b2.value - 1); +return ""; +} +if (isStuck()) yield; +} +b1.value = -1; +} +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "aF", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + "0"),}, b0, false, false, "+", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "aH", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 Zascii to number but it lies %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-costumes-list"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-result-"]; +const b2 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +const b3 = stage.variables["o4+OyKx[M=quu6p{=kRl-ascii2-list"]; +return function* genXYZ_ascii_to_number_but_ (p0) { +if (listContains(b0, p0)) { +runtime.ext_scratch3_looks._setCostume(target, p0); +if (((target.currentCostume + 1) > 26)) { +b1.value = ((target.currentCostume + 1) + 38); +} else { +b1.value = ((target.currentCostume + 1) + 96); +} +} else { +b2.value = 0; +for (var a0 = b3.value.length; a0 > 0; a0--) { +b2.value = ((+b2.value || 0) + 1); +if (compareEqual((b3.value[(b2.value | 0) - 1] ?? ""), p0)) { +b1.value = (b2.value - 1); +return ""; +} +yield; +} +b1.value = 0; +} +return ""; +}; }) + +// Sprite1 Winsert %s %n %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["o4+OyKx[M=quu6p{=kRl-result-"]; +const b1 = stage.variables["o4+OyKx[M=quu6p{=kRl-i-"]; +return function* genXYZ_insert___ (p0,p1,p2) { +b0.value = ""; +b1.value = 0; +for (var a0 = ((+p1 || 0) - 1); a0 >= 0.5; a0--) { +b1.value = ((+b1.value || 0) + 1); +b0.value = (("" + b0.value) + ((("" + p0))[(b1.value | 0) - 1] || "")); +if (isStuck()) yield; +} +b0.value = (("" + b0.value) + ("" + p2)); +b1.value = ((+b1.value || 0) + 1); +for (var a1 = (("" + p0).length - (+b1.value || 0)); a1 >= 0.5; a1--) { +b1.value = ((+b1.value || 0) + 1); +b0.value = (("" + b0.value) + ((("" + p0))[(b1.value | 0) - 1] || "")); +if (isStuck()) yield; +} +return ""; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOKAY %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OKAY_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "aB", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + "0"),}, b0, false, false, "*", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "aD", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-broadcast-self-restart-delay.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-broadcast-self-restart-delay.sb3.tw-snapshot new file mode 100644 index 00000000000..4dba7109918 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-broadcast-self-restart-delay.sb3.tw-snapshot @@ -0,0 +1,61 @@ +// TW Snapshot +// Input SHA-256: a018442bac20400dc82b159894be4f188118b41c2f85528416cdbe2eb221b01f + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +const b1 = stage.variables["XpJYYJ:ZH%1jU!x!l(ZP"]; +return function* genXYZ () { +b0.value = 0; +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +while (true) { +b1.value = 0; +yield; +} +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +const b1 = stage.variables["XpJYYJ:ZH%1jU!x!l(ZP"]; +return function* genXYZ () { +if (compareGreaterThan(b0.value, 3)) { +if (compareLessThan(b1.value, b0.value)) { +yield* thread.procedures["ZOK %s"](""); +} else { +yield* thread.procedures["ZFAIL %s"](""); +} +} else { +target.setCostume(target.currentCostume + 1); +b0.value = ((+b0.value || 0) + 1); +b1.value = ((+b1.value || 0) + 1); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +} +retire(); return; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "e", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "i", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "d", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "k", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-cannot-forceQueue-after-broadcast.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-cannot-forceQueue-after-broadcast.sb3.tw-snapshot new file mode 100644 index 00000000000..61b6860cd27 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-cannot-forceQueue-after-broadcast.sb3.tw-snapshot @@ -0,0 +1,37 @@ +// TW Snapshot +// Input SHA-256: a9d53758e603b449818a648433944c2775495122dab210fdaca971ab4f121a27 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "b", null); +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +const b1 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +b0.value = ((+b0.value || 0) + 1); +if ((b0.value === 1)) { +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +thread.timer = timer(); +var a0 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a0) { +yield; +} +thread.timer = null; +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b1, false, false, "l", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b1, false, false, "e", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b1, false, false, "m", null); +} +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-change-size-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-change-size-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..d93fb2bafa3 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-change-size-NaN.sb3.tw-snapshot @@ -0,0 +1,18 @@ +// TW Snapshot +// Input SHA-256: 794320c6ad6c499d6c1e160d8cd1df690fbf045e158faef0df130a0e07560e2b + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null); +target.setSize(100); +target.setSize(target.size + ((0 / 0) || 0)); +if ((Math.round(target.size) === 100)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "i", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "j", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "h", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-costume-name-infinity-nan.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-costume-name-infinity-nan.sb3.tw-snapshot new file mode 100644 index 00000000000..6c1aee826ce --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-costume-name-infinity-nan.sb3.tw-snapshot @@ -0,0 +1,35 @@ +// TW Snapshot +// Input SHA-256: dad2d51129eae742bdde75772afed267945ce57ccbc8890e504519ff6fd55318 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +runtime.ext_scratch3_looks._setCostume(target, "initial"); +yield* executeInCompatibilityLayer({"MESSAGE":"plan 6",}, b0, false, false, "m", null); +runtime.ext_scratch3_looks._setCostume(target, (1 / 0)); +if ((target.getCostumes()[target.currentCostume].name.toLowerCase() === "good".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass infinity costume name",}, b0, false, false, "x", null); +} +if (((target.currentCostume + 1) === 1)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass infinity costume number",}, b0, false, false, "z", null); +} +runtime.ext_scratch3_looks._setCostume(target, "initial"); +runtime.ext_scratch3_looks._setCostume(target, (1 / -0)); +if ((target.getCostumes()[target.currentCostume].name.toLowerCase() === "good".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -infinity costume name",}, b0, false, false, "E", null); +} +if (((target.currentCostume + 1) === 1)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -infinity costume number",}, b0, false, false, "G", null); +} +runtime.ext_scratch3_looks._setCostume(target, "initial"); +runtime.ext_scratch3_looks._setCostume(target, (0 / 0)); +if ((target.getCostumes()[target.currentCostume].name.toLowerCase() === "good".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass nan costume name",}, b0, false, false, "L", null); +} +if (((target.currentCostume + 1) === 1)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass nan costume number",}, b0, false, false, "O", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "N", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-for-each-in.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-for-each-in.sb3.tw-snapshot new file mode 100644 index 00000000000..ce167385193 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-for-each-in.sb3.tw-snapshot @@ -0,0 +1,134 @@ +// TW Snapshot +// Input SHA-256: 4a00d758e882b2fe0b57020459268c0db38afb7aee290e57f045a5dab2ece743 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["om$AKtHax/H0kJUzYbbi"]; +const b1 = stage.variables["7Oj/v$#js7a33uH`xGl;"]; +return function* genXYZ () { +b0.value = "no change"; +b1.value = 0; +var a0 = 0; while (a0 < 10) { a0++; b0.value = a0; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 10),"i = 10 (each 10)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 10),"dummy = 10 (each 10)"); +b0.value = "no change"; +b1.value = 0; +var a1 = 0; while (a1 < 1) { a1++; b0.value = a1; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 1),"i = 1 (each 1)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 1),"dummy = 1 (each 1)"); +b0.value = "no change"; +b1.value = 0; +var a2 = 0; while (a2 < 0) { a2++; b0.value = a2; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "no change".toLowerCase()),"i = no change (each 0)"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b1.value, 0),"dummy = 0 (each 0)"); +b0.value = "no change"; +b1.value = 0; +var a3 = 0; while (a3 < -5) { a3++; b0.value = a3; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "no change".toLowerCase()),"i = no change (each -5)"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b1.value, 0),"dummy = 0 (each -5)"); +b0.value = "no change"; +b1.value = 0; +var a4 = 0; while (a4 < 0) { a4++; b0.value = a4; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "no change".toLowerCase()),"i = no change (each aaaaaa)"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b1.value, 0),"dummy = 0 (each aaaaaa)"); +b0.value = "no change"; +b1.value = 0; +var a5 = 0; while (a5 < 5.9) { a5++; b0.value = a5; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 6),"i = 6 (each 5.9)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 6),"dummy = 6 (each 5.9)"); +b0.value = "no change"; +b1.value = 0; +var a6 = 0; while (a6 < 5.1) { a6++; b0.value = a6; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 6),"i = 6 (each 5.1)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 6),"dummy = 6 (each 5.1)"); +b0.value = "no change"; +b1.value = 0; +var a7 = 0; while (a7 < -0.1) { a7++; b0.value = a7; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"]((("" + b0.value).toLowerCase() === "no change".toLowerCase()),"i = no change (each -0.1)"); +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b1.value, 0),"dummy = 0 (each -0.1)"); +b0.value = "no change"; +b1.value = 0; +var a8 = 0; while (a8 < 0.1) { a8++; b0.value = a8; +b1.value = ((+b1.value || 0) + 1); +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 1),"i = 1 (each 0.1)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 1),"dummy = 1 (each 0.1)"); +b0.value = "no change"; +var a9 = 0; while (a9 < 5) { a9++; b0.value = a9; +b0.value = 8; +b1.value = 9; +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 8),"i = 8 (each 5 w/set)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 9),"dummy = 9 (each 5 w/set)"); +b0.value = "no change"; +b1.value = 1; +var a10 = 0; while (a10 < 5) { a10++; b0.value = a10; +yield* thread.procedures["ZassertTrue %b %s"](compareEqual(b0.value, b1.value),"i = dummy (each 5 w/set+dummy check)"); +b1.value = ((+b1.value || 0) + 1); +b0.value = 9999; +yield; +} +yield* thread.procedures["ZassertTrue %b %s"](((+b0.value || 0) === 9999),"i = 9999 (after each 5 w/set+dummy check)"); +yield* thread.procedures["ZassertTrue %b %s"](((+b1.value || 0) === 6),"dummy = 6 (after each 5 w/set+dummy check)"); +yield* thread.procedures["ZOK %s"]("ok"); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "O", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "Q", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "S", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "U", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-glide-negative-time.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-glide-negative-time.sb3.tw-snapshot new file mode 100644 index 00000000000..24acc11d952 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-glide-negative-time.sb3.tw-snapshot @@ -0,0 +1,43 @@ +// TW Snapshot +// Input SHA-256: 02a87b5a1b3b7a692c904422b1b22ea0fb6a7240ab3ca998a921674f4152b04e + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +thread.timer = timer(); +var a0 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a0) { +yield; +} +thread.timer = null; +thread.timer = timer(); +var a1 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a1) { +yield; +} +thread.timer = null; +if ((limitPrecision(target.x) === 100)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "m", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "n", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = runtime.getOpcodeFunction("motion_glidesecstoxy"); +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null); +target.setXY(0, 0); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +yield* executeInCompatibilityLayer({"SECS":-1,"X":100,"Y":0,}, b1, false, false, "h", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-glide-xy-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-glide-xy-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..349094412fa --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-glide-xy-NaN.sb3.tw-snapshot @@ -0,0 +1,19 @@ +// TW Snapshot +// Input SHA-256: 052a07292a98c770d3cdf1df2670a8eb2c4e488041187e45e7ffb6e8944013b6 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = runtime.getOpcodeFunction("motion_glidesecstoxy"); +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null); +target.setXY(-100, -100); +yield* executeInCompatibilityLayer({"SECS":0,"X":(0 / 0),"Y":100,}, b1, false, false, "b", null); +if ((limitPrecision(target.x) === 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "i", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "j", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "h", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-mathop-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-mathop-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..59e376d2266 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-mathop-NaN.sb3.tw-snapshot @@ -0,0 +1,37 @@ +// TW Snapshot +// Input SHA-256: 082b59a5b772f80c84bc6a846d9ea5023863d8f90c5b85e599b53fed7a9d6a46 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 8",}, b0, false, false, "j", null); +b1.value = (1 / 0); +if (((10 + (Math.sqrt(-1) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "R", null); +} +if (((10 + ((Math.round(Math.sin((Math.PI * (+b1.value || 0)) / 180) * 1e10) / 1e10) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "B", null); +} +if (((10 + ((Math.round(Math.cos((Math.PI * (+b1.value || 0)) / 180) * 1e10) / 1e10) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "D", null); +} +if (((10 + (tan((+b1.value || 0)) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "F", null); +} +if (((10 + (((Math.asin(2) * 180) / Math.PI) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "H", null); +} +if (((10 + (((Math.acos(2) * 180) / Math.PI) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "J", null); +} +if (((10 + (Math.log(-1) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "L", null); +} +if (((10 + ((Math.log(-1) / Math.LN10) || 0)) === 10)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "O", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "N", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-negative-zero.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-negative-zero.sb3.tw-snapshot new file mode 100644 index 00000000000..8fdbb26b8f4 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-negative-zero.sb3.tw-snapshot @@ -0,0 +1,44 @@ +// TW Snapshot +// Input SHA-256: 392c8fcd9ce3e05cfb9ec1f39713073fca6c3a702fbd49697e2e496376e6b4f6 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZassertTrue %b %s"]((((1 / 0) || 0) === Infinity),"1/0"); +yield* thread.procedures["ZassertTrue %b %s"]((((1 / -0) || 0) === -Infinity),"1/-0"); +yield* thread.procedures["ZOK %s"]("ok"); +retire(); return; +}; }) + +// Sprite1 ZassertTrue %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assertTrue__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "i", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "k", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "m", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "o", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-operators-output-NaN.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-operators-output-NaN.sb3.tw-snapshot new file mode 100644 index 00000000000..042ff267e16 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-operators-output-NaN.sb3.tw-snapshot @@ -0,0 +1,27 @@ +// TW Snapshot +// Input SHA-256: 289d73b9be2b60f501e57768410029798d2dec7d971e5935e5f19fb2a9988169 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["k|@-`:^^Mo+E}$({|2/P"]; +const b2 = stage.variables["t2m05.oW;5f0=GL30@pV"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 4",}, b0, false, false, "g", null); +b1.value = (1 / 0); +b2.value = (-1 / 0); +if ((("" + (b1.value + b2.value)).toLowerCase() === "NaN".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "m", null); +} +if ((("" + ((+b1.value || 0) - (+b1.value || 0))).toLowerCase() === "NaN".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "n", null); +} +if ((("" + ((+b1.value || 0) * 0)).toLowerCase() === "NaN".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "o", null); +} +if ((("" + (0 / 0)).toLowerCase() === "NaN".toLowerCase())) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 1",}, b0, false, false, "q", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "p", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-operators.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-operators.sb3.tw-snapshot new file mode 100644 index 00000000000..410134f99b6 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-operators.sb3.tw-snapshot @@ -0,0 +1,165 @@ +// TW Snapshot +// Input SHA-256: 1142c0dcd16b015bae6b8df3e70e1e4572decc653e0c5f4af57a9a7313e8d458 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["Zassert %b %s"]((((0.1 + 0.2) || 0) === 0.30000000000000004),"adding must work w/ floating point errors"); +yield* thread.procedures["Zassert %b %s"]((((0.2 - -0.1) || 0) === 0.30000000000000004),"subtraction must work w/ floating point errors"); +yield* thread.procedures["Zassert %b %s"]((((0 - 5) || 0) === -5),"substraction should invert with empty right side"); +yield* thread.procedures["Zassert %b %s"]((((222 * 2) || 0) === 444),"multiplication must work"); +yield* thread.procedures["Zassert %b %s"]((((222 / 2) || 0) === 111),"division must work"); +yield* thread.procedures["Zassert %b %s"]((((100 / 0) || 0) === Infinity),"100/0 must equal Infinity"); +for (var a0 = 5; a0 > 0; a0--) { +yield* thread.procedures["Zassert %b %s"](!(randomInt(1, 10) < 1),"pick random should have a lower bound (inclusive)"); +yield* thread.procedures["Zassert %b %s"](!(randomInt(1, 10) > 10),"pick random should have an upper bound (inclusive)"); +yield* thread.procedures["Zassert %b %s"]((1 === 1),"pick random of range 0 should return either bound"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1, 2) || 0), 1), 0),"pick random w/ decimal bounds should return decimals"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1, 2) || 0), 1), 0),"pick random w/ decimal (.0) bounds should return decimals"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1, 2) || 0), 1), 0),"pick random w/ decimal (.0) bounds should return decimals"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1.1, 2) || 0), 1), 0),"pick random w/ decimal bounds should return decimals"); +yield* thread.procedures["Zassert %b %s"](!compareEqual(mod((randomFloat(1, 2.1) || 0), 1), 0),"pick random w/ decimal bounds should return decimals"); +yield; +} +yield* thread.procedures["Zassert %b %s"]((1 > 0),"1 must be greater than 0"); +yield* thread.procedures["Zassert %b %s"](!(0 > 1),"0 must not be greater than 1"); +yield* thread.procedures["Zassert %b %s"]((0 < 1),"0 must be less than 1"); +yield* thread.procedures["Zassert %b %s"](!(1 < 0),"1 must not be greater than 1"); +yield* thread.procedures["Zassert %b %s"]((1 === 1),"1 must equal 1"); +yield* thread.procedures["Zassert %b %s"](!("hello".toLowerCase() === "world".toLowerCase()),"hello must not equal world"); +yield* thread.procedures["Zassert %b %s"](("hello".toLowerCase() === "hello".toLowerCase()),"hello must equal hello"); +yield* thread.procedures["Zassert %b %s"](("".toLowerCase() === "".toLowerCase()),"empty must equal empty"); +yield* thread.procedures["Zassert %b %s"](!(" ".toLowerCase() === "".toLowerCase()),"spaces must not be ignored in equal"); +yield* thread.procedures["Zassert %b %s"](("👌".toLowerCase() === "👌".toLowerCase()),"equal should support emoji"); +yield* thread.procedures["Zassert %b %s"](!(0.30000000000000004 === 0.3),"number comparison must be precise"); +yield* thread.procedures["Zassert %b %s"]((0.1 === 0.1),"number comparison should disregard following zeros"); +yield* thread.procedures["Zassert %b %s"]((0.1 === 0.1),"number comparison should disregard leading zeros"); +yield* thread.procedures["Zassert %b %s"](compareEqual((0 / 0), (0 / 0)),"number NaN must equal number NaN"); +yield* thread.procedures["Zassert %b %s"](!false,"empty negate must be true"); +yield* thread.procedures["Zassert %b %s"](!!!false,"negate true must be false"); +yield* thread.procedures["Zassert %b %s"](!!!!!!!false,"negates must be stackable to the moon"); +yield* thread.procedures["Zassert %b %s"]((("apple " + "banana").toLowerCase() === "apple banana".toLowerCase()),"join must join strings"); +yield* thread.procedures["Zassert %b %s"](((("apple")[1 - 1] || "").toLowerCase() === "a".toLowerCase()),"letter 1 of apple must be apple"); +yield* thread.procedures["Zassert %b %s"](((("apple")[0 - 1] || "").toLowerCase() === "".toLowerCase()),"letter 0 of apple must be empty"); +yield* thread.procedures["Zassert %b %s"](((("apple")[((0 - 1) | 0) - 1] || "").toLowerCase() === "".toLowerCase()),"letter -1 of apple must be empty"); +yield* thread.procedures["Zassert %b %s"](((("apple")[9999 - 1] || "").toLowerCase() === "".toLowerCase()),"letter 9999 of apple must be empty"); +yield* thread.procedures["Zassert %b %s"](("apple".length === 5),"length of apple must be 5"); +yield* thread.procedures["Zassert %b %s"](("".length === 0),"length of empty string must be 0"); +yield* thread.procedures["Zassert %b %s"](("apple".toLowerCase().indexOf("a".toLowerCase()) !== -1),"apple must contain a"); +yield* thread.procedures["Zassert %b %s"](!("apple".toLowerCase().indexOf("b".toLowerCase()) !== -1),"apple must not contain b"); +yield* thread.procedures["Zassert %b %s"](!("👌".toLowerCase().indexOf("👏".toLowerCase()) !== -1),"👌 must not contain 👏"); +yield* thread.procedures["Zassert %b %s"](("👌👌".toLowerCase().indexOf("👌".toLowerCase()) !== -1),"👌👌 must contain 👌"); +yield* thread.procedures["Zassert %b %s"](((mod(3, 4) || 0) === 3),"3 mod 4 must be 3"); +yield* thread.procedures["Zassert %b %s"](((mod(3, -4) || 0) === -1),"3 mod -4 must be -1"); +yield* thread.procedures["Zassert %b %s"](((mod(-3, 4) || 0) === 1),"-3 mod 4 must be 1"); +yield* thread.procedures["Zassert %b %s"](compareEqual(mod(3, 3), 0),"a number mod itself must be 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual(mod(-3, 3), 0),"a number mod it's positive inverse must be 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual(mod(3, -3), 0),"a number mod it's negative inverse must be 0"); +yield* thread.procedures["Zassert %b %s"]((("" + mod(3, 0)).toLowerCase() === "NaN".toLowerCase()),"any number mod 0 must be NaN"); +yield* thread.procedures["Zassert %b %s"](((mod(1.5, 1) || 0) === 0.5),"mod 1 must result in only decimal part"); +yield* thread.procedures["Zassert %b %s"](((mod(3.3, 1) || 0) === 0.2999999999999998),"3.3 mod 1 must have floating point errors"); +yield* thread.procedures["Zassert %b %s"]((Math.round(0) === 0),"rounding 0 must be 0"); +yield* thread.procedures["Zassert %b %s"]((Math.round(0.1) === 0),"rounding .1 must be 0"); +yield* thread.procedures["Zassert %b %s"]((Math.round(0.9) === 1),"rounding .9 must be 1"); +yield* thread.procedures["Zassert %b %s"]((Math.round(-0.5) === 0),"rounding -.5 must be 0"); +yield* thread.procedures["Zassert %b %s"]((Math.round(-0.1) === 0),"roudning -.1 must be 0"); +yield* thread.procedures["Zassert %b %s"]((Math.round(-0.51) === -1),"roudning -.51 must be -1"); +yield* thread.procedures["Zassert %b %s"](((+!false) === 1),"true must equal 1"); +yield* thread.procedures["Zassert %b %s"](((+!!false) === 0),"false must equal 0"); +yield* thread.procedures["Zassert %b %s"]((((9007199254740992 + 1) || 0) === 9007199254740992),"math should start breaking after 9007199254740991"); +yield* thread.procedures["Zassert %b %s"]((Math.abs(5) === 5),"absolute value of a position number should be itself"); +yield* thread.procedures["Zassert %b %s"]((Math.abs(-5) === 5),"absolute value of a negative number should be its inverse"); +yield* thread.procedures["Zassert %b %s"]((Math.floor(5.9) === 5),"floor of a number should round it down"); +yield* thread.procedures["Zassert %b %s"]((Math.ceil(5.9) === 6),"ceiling of a number should round it up"); +yield* thread.procedures["Zassert %b %s"](((Math.sqrt(4) || 0) === 2),"sqrt of 4 must be 2"); +yield* thread.procedures["Zassert %b %s"](((Math.sqrt(2) || 0) === 1.4142135623730951),"sqrt of 2 must be 1.4142135623730951"); +yield* thread.procedures["Zassert %b %s"]((Math.round((((Math.asin(0.5) * 180) / Math.PI) || 0)) === 30),"asin of .5 must be roughly 30"); +yield* thread.procedures["Zassert %b %s"](compareEqual(Math.log(1), 0),"ln 1 must be 0"); +yield* thread.procedures["Zassert %b %s"](((Math.log(2) || 0) === 0.6931471805599453),"ln 2 must be 0.69314..."); +yield* thread.procedures["Zassert %b %s"](((Math.log(2.718281828459045) || 0) === 1),"ln e must be 1"); +yield* thread.procedures["Zassert %b %s"](((Math.log(Math.exp(2)) || 0) === 2),"ln e^2 must be 2"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.log(1) / Math.LN10), 0),"log 1 must be 0"); +yield* thread.procedures["Zassert %b %s"]((((Math.log(2) / Math.LN10) || 0) === 0.30102999566398114),"log 2 must be 0.3010..."); +yield* thread.procedures["Zassert %b %s"]((((Math.log(10) / Math.LN10) || 0) === 1),"log 10 must be 1"); +yield* thread.procedures["Zassert %b %s"]((((Math.log(100) / Math.LN10) || 0) === 2),"log 100 must be 2"); +yield* thread.procedures["Zassert %b %s"]((Math.exp(1) === 2.718281828459045),"e ^ 1 must be 2.718281828459045"); +yield* thread.procedures["Zassert %b %s"]((Math.exp(0) === 1),"e ^ 0 must be 1"); +yield* thread.procedures["Zassert %b %s"](((10 ** 1) === 10),"10 ^ 1 must be 10"); +yield* thread.procedures["Zassert %b %s"](((10 ** 0) === 1),"10 ^ 0 must be 1"); +yield* thread.procedures["Zassert %b %s"](((10 ** 2) === 100),"10 ^ 2 must be 100"); +yield* thread.procedures["Zassert %b %s"](((+(0 === 50)) === (+(0 === 50))),"real false = real false"); +yield* thread.procedures["Zassert %b %s"](((+("".toLowerCase() === "".toLowerCase())) === (+("".toLowerCase() === "".toLowerCase()))),"real true = real true"); +yield* thread.procedures["Zassert %b %s"](("true".toLowerCase() === ("" + ("".toLowerCase() === "".toLowerCase())).toLowerCase()),"string true = real true"); +yield* thread.procedures["Zassert %b %s"](("false".toLowerCase() === ("" + (0 === 50)).toLowerCase()),"string false = real false"); +yield* thread.procedures["Zassert %b %s"]((("" + ("".toLowerCase() === "".toLowerCase())).toLowerCase() === "true".toLowerCase()),"real true = string true"); +yield* thread.procedures["Zassert %b %s"]((("" + (0 === 50)).toLowerCase() === "false".toLowerCase()),"real false = string false"); +yield* thread.procedures["Zassert %b %s"](((+(0 === 1)) === 0),"real false = string 0"); +yield* thread.procedures["Zassert %b %s"](((+(0 === 0)) === 1),"real true = string 1"); +yield* thread.procedures["Zassert %b %s"](compareEqual((0 === 1), (0 + 0)),"real false = number 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual((0 === 0), (1 + 0)),"real true = number 1"); +yield* thread.procedures["Zassert %b %s"](((((+("0x" + "12f3") || 0) + 0) || 0) === 4851),"positive hex"); +yield* thread.procedures["Zassert %b %s"](((((+("0o" + "127") || 0) + 0) || 0) === 87),"positive octal"); +yield* thread.procedures["Zassert %b %s"](((((+("0b" + "1010101") || 0) + 0) || 0) === 85),"positive binary"); +yield* thread.procedures["Zassert %b %s"](compareEqual(((+("-0x" + "123") || 0) + 0), 0),"negative hex is 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual(((+("-0o" + "123") || 0) + 0), 0),"negative octal is 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual(((+("-0b" + "10101") || 0) + 0), 0),"negative binary is 0"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * 57.7) / 180) * 1e10) / 1e10) || 0) === 0.8452618332),"sin 57.7"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * 0) / 180) * 1e10) / 1e10), 0),"sin 0"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * 90) / 180) * 1e10) / 1e10) || 0) === 1),"sin 90"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * 180) / 180) * 1e10) / 1e10), 0),"sin 180"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * 270) / 180) * 1e10) / 1e10) || 0) === -1),"sin 270"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * 360) / 180) * 1e10) / 1e10), 0),"sin 360"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * 450) / 180) * 1e10) / 1e10) || 0) === 1),"sin 450"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * -90) / 180) * 1e10) / 1e10) || 0) === -1),"sin -90"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * -180) / 180) * 1e10) / 1e10), 0),"sin -180"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * -270) / 180) * 1e10) / 1e10) || 0) === 1),"sin -270"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.sin((Math.PI * -360) / 180) * 1e10) / 1e10), 0),"sin -360"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.sin((Math.PI * -450) / 180) * 1e10) / 1e10) || 0) === -1),"sin -450"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * 57.7) / 180) * 1e10) / 1e10) || 0) === 0.5343523494),"cos 57.7"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * 0) / 180) * 1e10) / 1e10) || 0) === 1),"cos 0"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * 90) / 180) * 1e10) / 1e10), 0),"cos 90"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * 180) / 180) * 1e10) / 1e10) || 0) === -1),"cos 180"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * 270) / 180) * 1e10) / 1e10), 0),"cos 270"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * 360) / 180) * 1e10) / 1e10) || 0) === 1),"cos 360"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * 450) / 180) * 1e10) / 1e10), 0),"cos 450"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * -90) / 180) * 1e10) / 1e10), 0),"cos -90"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * -180) / 180) * 1e10) / 1e10) || 0) === -1),"cos -180"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * -270) / 180) * 1e10) / 1e10), 0),"cos -270"); +yield* thread.procedures["Zassert %b %s"]((((Math.round(Math.cos((Math.PI * -360) / 180) * 1e10) / 1e10) || 0) === 1),"cos -360"); +yield* thread.procedures["Zassert %b %s"](compareEqual((Math.round(Math.cos((Math.PI * -450) / 180) * 1e10) / 1e10), 0),"cos -450"); +yield* thread.procedures["ZOKAY"](); +retire(); return; +}; }) + +// Sprite1 Zassert %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assert__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 ZOKAY +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OKAY () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "cL", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + "0"),}, b0, false, false, "aX", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "cM", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "a!", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + "0"),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "a%", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-preserve-order-after-stop-other-scripts.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-preserve-order-after-stop-other-scripts.sb3.tw-snapshot new file mode 100644 index 00000000000..d5352099960 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-preserve-order-after-stop-other-scripts.sb3.tw-snapshot @@ -0,0 +1,81 @@ +// TW Snapshot +// Input SHA-256: 33ae042ed2e2affa758cf695de33f44b075e96d01ccb919972d262517492f6fc + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["C7VGwqE9rvJgpw(oV^?E"]; +return function* genXYZ () { +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "3" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "2" }); +runtime.stopForTarget(target, thread); +b0.value = []; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "2" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "3" }); +thread.timer = timer(); +var a0 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a0) { +yield; +} +thread.timer = null; +if (((+listContents(b0) || 0) === 312)) { +yield* thread.procedures["ZOK %s"](""); +} else { +yield* thread.procedures["ZFAIL %s"](""); +} +retire(); return; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "b", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "f", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "h", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "j", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["C7VGwqE9rvJgpw(oV^?E"]; +return function* genXYZ () { +b0.value.push(1); +b0._monitorUpToDate = false; +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["C7VGwqE9rvJgpw(oV^?E"]; +return function* genXYZ () { +b0.value.push(2); +b0._monitorUpToDate = false; +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["C7VGwqE9rvJgpw(oV^?E"]; +return function* genXYZ () { +b0.value.push(3); +b0._monitorUpToDate = false; +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-procedure-definition-order.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-procedure-definition-order.sb3.tw-snapshot new file mode 100644 index 00000000000..63d4e6deecd --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-procedure-definition-order.sb3.tw-snapshot @@ -0,0 +1,28 @@ +// TW Snapshot +// Input SHA-256: 2979239837a20f2d91405b400ec98101ec8262f2e0b89b0f0204591c9dd9c25d + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["ZA"](); +retire(); return; +}; }) + +// Sprite1 ZA +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_A () { +yield* thread.procedures["ZOK %s"](""); +return ""; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "a", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "e", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-run-blocks-after-self-broadcast.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-run-blocks-after-self-broadcast.sb3.tw-snapshot new file mode 100644 index 00000000000..24dc9e4c3d5 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-run-blocks-after-self-broadcast.sb3.tw-snapshot @@ -0,0 +1,56 @@ +// TW Snapshot +// Input SHA-256: 9902bbdd6b9a5d5c25b5382a533e1b3a72ea1f5ca68709abf08a9e6af339f2c7 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables[")Vp94b3HO|$4At]V7XiJ"]; +const b1 = stage.variables["`NuUx`@:w=|8`D7S4l-t"]; +return function* genXYZ () { +b0.value = 0; +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables[")Vp94b3HO|$4At]V7XiJ"]; +const b1 = stage.variables["`NuUx`@:w=|8`D7S4l-t"]; +return function* genXYZ () { +if (compareEqual(b0.value, 0)) { +b0.value = 1; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +b1.value = 1; +} else { +if (((+b1.value || 0) === 1)) { +yield* thread.procedures["ZOK %s"](""); +} else { +yield* thread.procedures["ZFAIL %s"](""); +} +} +retire(); return; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "i", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "d", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "k", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "e", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "c", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "g", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-scripts-run-after-stop-all.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-scripts-run-after-stop-all.sb3.tw-snapshot new file mode 100644 index 00000000000..8a3a1131c49 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-scripts-run-after-stop-all.sb3.tw-snapshot @@ -0,0 +1,93 @@ +// TW Snapshot +// Input SHA-256: 53f9471a2e476b366db519bae1d739833c0210dd92ca501a29a3dfce9a1f960d + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "3loop" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["5*)/o6gQzEw)31Ah!j:j"]; +const b1 = stage.variables["sYUvu8`..xuGcWX3!B1k"]; +return function* genXYZ () { +while (!compareGreaterThan(b0.value, 2)) { +b0.value = ((+b0.value || 0) + 1); +yield; +} +if (((+b1.value || 0) === 1)) { +yield* thread.procedures["ZOK %s"](""); +} else { +if (compareEqual(b1.value, 0)) { +yield* thread.procedures["ZFAIL %s"]("variable 1 haven't been incremented"); +} else { +yield* thread.procedures["ZFAIL %s"]("variable 1 got incremented multiple times"); +} +} +retire(); return; +}; }) + +// Sprite1 ZOK %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OK_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "f", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + ("" + p0)),}, b0, false, false, "d", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "h", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + ("" + p0)),}, b0, false, false, "e", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "l", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["sYUvu8`..xuGcWX3!B1k"]; +const b1 = stage.variables["5*)/o6gQzEw)31Ah!j:j"]; +return function* genXYZ () { +b0.value = 0; +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "2" }); +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "3" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +runtime.stopAll(); +retire(); return; +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "1loop" }); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["sYUvu8`..xuGcWX3!B1k"]; +return function* genXYZ () { +while (true) { +b0.value = ((+b0.value || 0) + 1); +yield; +} +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-stop-other-scripts-in-sprite.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-stop-other-scripts-in-sprite.sb3.tw-snapshot new file mode 100644 index 00000000000..e447f4aa379 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-stop-other-scripts-in-sprite.sb3.tw-snapshot @@ -0,0 +1,36 @@ +// TW Snapshot +// Input SHA-256: 1d077dfdf08990f391b64e59cc3b31530abe3b2aef12e54678743a1f74f99ae5 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "b", null); +b1.value = 0; +startHats("event_whenbroadcastreceived", { BROADCAST_OPTION: "message1" }); +runtime.stopForTarget(target, thread); +thread.timer = timer(); +var a0 = Math.max(0, 1000 * 0); +runtime.requestRedraw(); +yield; +while (thread.timer.timeElapsed() < a0) { +yield; +} +thread.timer = null; +if (compareEqual(b1.value, 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "k", null); +} else { +yield* executeInCompatibilityLayer({"MESSAGE":"fail",}, b0, false, false, "m", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "j", null); +retire(); return; +}; }) + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; +return function* genXYZ () { +b0.value = ((+b0.value || 0) + 1); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-string-functions.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-string-functions.sb3.tw-snapshot new file mode 100644 index 00000000000..155a3616491 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-string-functions.sb3.tw-snapshot @@ -0,0 +1,282 @@ +// TW Snapshot +// Input SHA-256: 0d7c7d4a267a29ff249f9314e87a7a7170870dc48175ffdba5a12fa48e8ba0a2 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ () { +yield* thread.procedures["Ztest endsWith"](); +yield* thread.procedures["Ztest startsWith"](); +yield* thread.procedures["Ztest includes"](); +yield* thread.procedures["Ztest indexOf"](); +yield* thread.procedures["Ztest replace"](); +yield* thread.procedures["ZOKAY %s"]((("" + runtime.ioDevices.clock.projectTimer()) + " seconds")); +retire(); return; +}; }) + +// Sprite1 Ztest endsWith +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_endsWith () { +yield* thread.procedures["W%s .endsWith( %s )"](12333,333); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must end with 333"); +yield* thread.procedures["W%s .endsWith( %s )"](12333,33); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must end with 33"); +yield* thread.procedures["W%s .endsWith( %s )"](12333,""); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must end with empty string"); +yield* thread.procedures["W%s .endsWith( %s )"](12333,4); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "false".toLowerCase()),"12333 must not end with 4"); +yield* thread.procedures["W%s .endsWith( %s )"](12333,123334); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "false".toLowerCase()),"12333 must not end with 123334"); +yield* thread.procedures["W%s .endsWith( %s )"](12333,12333); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must end with itself"); +yield* thread.procedures["W%s .includes( %s )"]("abc",""); +return ""; +}; }) + +// Sprite1 Ztest startsWith +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_startsWith () { +yield* thread.procedures["W%s .startsWith( %s )"](12333,12333); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 12333"); +yield* thread.procedures["W%s .startsWith( %s )"](12333,1233); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 1233"); +yield* thread.procedures["W%s .startsWith( %s )"](12333,123); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 123"); +yield* thread.procedures["W%s .startsWith( %s )"](12333,12); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 12"); +yield* thread.procedures["W%s .startsWith( %s )"](12333,1); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with 1"); +yield* thread.procedures["W%s .startsWith( %s )"](12333,""); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"12333 must start with empty string"); +yield* thread.procedures["W%s .startsWith( %s )"](12333,33); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "false".toLowerCase()),"12333 must not start with 33"); +return ""; +}; }) + +// Sprite1 Ztest includes +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_includes () { +yield* thread.procedures["W%s .includes( %s )"]("abc",""); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include empty string"); +yield* thread.procedures["W%s .includes( %s )"]("",""); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"empty string must include empty string"); +yield* thread.procedures["W%s .includes( %s )"]("abc","abc"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include abc"); +yield* thread.procedures["W%s .includes( %s )"]("abc","a"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include a"); +yield* thread.procedures["W%s .includes( %s )"]("abc","b"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include b"); +yield* thread.procedures["W%s .includes( %s )"]("abc","c"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include c"); +yield* thread.procedures["W%s .includes( %s )"]("abc","ab"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include ab"); +yield* thread.procedures["W%s .includes( %s )"]("abc","bc"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "true".toLowerCase()),"abc must include bc"); +yield* thread.procedures["W%s .includes( %s )"]("abc","aa"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "false".toLowerCase()),"abc must not include aa"); +return ""; +}; }) + +// Sprite1 Ztest indexOf +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_indexOf () { +yield* thread.procedures["W%s .indexOf( %s )"](123,1); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 1),"index of 1 in 123 is 1"); +yield* thread.procedures["W%s .indexOf( %s )"](123,2); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 2),"index of 2 in 123 is 2"); +yield* thread.procedures["W%s .indexOf( %s )"](123,3); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 3),"index of 3 in 123 is 3"); +yield* thread.procedures["W%s .indexOf( %s )"](123,"aaaa"); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === -1),"index of aaaa in 123 is -1"); +return ""; +}; }) + +// Sprite1 Ztest lastIndexOf +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function funXYZ_test_lastIndexOf () { +return ""; +}; }) + +// Sprite1 Ztest replace +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ_test_replace () { +yield* thread.procedures["W%s .replace( %s with %s )"](123456,345,"a"); +yield* thread.procedures["Zassert %b %s"]((("" + b0.value).toLowerCase() === "12a6".toLowerCase()),"replace expected 12a6"); +yield* thread.procedures["W%s .replace( %s with %s )"](123,123,456); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 456),"replace expected 456"); +yield* thread.procedures["W%s .replace( %s with %s )"](123,1234,456); +yield* thread.procedures["Zassert %b %s"](((+b0.value || 0) === 123),"replace expected 123"); +return ""; +}; }) + +// Sprite1 Ztest split +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function funXYZ_test_split () { +return ""; +}; }) + +// Sprite1 ZOKAY %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_OKAY_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "aq", null); +yield* executeInCompatibilityLayer({"MESSAGE":("pass " + "0"),}, b0, false, false, "C", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "as", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) + +// Sprite1 W%s .endsWith( %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ___endsWith____ (p0,p1) { +b0.value = []; +b1.value = ("" + p0).length; +for (var a0 = ("" + p1).length; a0 > 0; a0--) { +b0.value.unshift(((("" + p0))[((+b1.value) | 0) - 1] || "")); +b0._monitorUpToDate = false; +b1.value = ((+b1.value || 0) + -1); +if (isStuck()) yield; +} +b2.value = compareEqual(listContents(b0), p1); +return ""; +}; }) + +// Sprite1 Zassert %b %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +return function* genXYZ_assert__ (p0,p1) { +if (!toBoolean(p0)) { +yield* thread.procedures["ZFAIL %s"](p1); +} +return ""; +}; }) + +// Sprite1 W%s .includes( %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +return function* genXYZ___includes____ (p0,p1) { +if ((("" + p1).length === 0)) { +b0.value = "true"; +return ""; +} +b1.value = []; +b0.value = "false"; +b2.value = 0; +for (var a0 = ("" + p0).length; a0 > 0; a0--) { +b2.value = ((+b2.value || 0) + 1); +b1.value.push(((("" + p0))[(b2.value | 0) - 1] || "")); +b1._monitorUpToDate = false; +if ((b1.value.length > ("" + p1).length)) { +b1.value.shift(); +b1._monitorUpToDate = false; +} +if (compareEqual(listContents(b1), p1)) { +b0.value = "true"; +return ""; +} +if (isStuck()) yield; +} +return ""; +}; }) + +// Sprite1 W%s .startsWith( %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +return function* genXYZ___startsWith____ (p0,p1) { +b0.value = []; +b1.value = 0; +for (var a0 = ("" + p1).length; a0 > 0; a0--) { +b1.value = ((+b1.value || 0) + 1); +b0.value.push(((("" + p0))[(b1.value | 0) - 1] || "")); +b0._monitorUpToDate = false; +if (isStuck()) yield; +} +b2.value = compareEqual(listContents(b0), p1); +return ""; +}; }) + +// Sprite1 W%s .indexOf( %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +return function* genXYZ___indexOf____ (p0,p1) { +b0.value = []; +b1.value = -1; +b2.value = 0; +for (var a0 = ("" + p0).length; a0 > 0; a0--) { +b2.value = ((+b2.value || 0) + 1); +b0.value.push(((("" + p0))[(b2.value | 0) - 1] || "")); +b0._monitorUpToDate = false; +if ((b0.value.length > ("" + p1).length)) { +b0.value.shift(); +b0._monitorUpToDate = false; +} +if (compareEqual(listContents(b0), p1)) { +b1.value = (b2.value - (("" + p1).length - 1)); +return ""; +} +if (isStuck()) yield; +} +return ""; +}; }) + +// Sprite1 W%s .replace( %s with %s ) +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:bufferl-list"]; +const b1 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:templ-list"]; +const b2 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-@return-"]; +const b3 = stage.variables["aBQ}o|vZt_fHtB~ZyHPZ-sutils:iterator-"]; +return function* genXYZ___replace___with___ (p0,p1,p2) { +b0.value = []; +b1.value = []; +b2.value = ""; +b3.value = 0; +for (var a0 = ("" + p0).length; a0 > 0; a0--) { +b3.value = ((+b3.value || 0) + 1); +b0.value.push(((("" + p0))[(b3.value | 0) - 1] || "")); +b0._monitorUpToDate = false; +if ((b0.value.length > ("" + p1).length)) { +b0.value.shift(); +b0._monitorUpToDate = false; +} +b1.value.push(((("" + p0))[(b3.value | 0) - 1] || "")); +b1._monitorUpToDate = false; +if (compareEqual(listContents(b0), p1)) { +for (var a1 = ("" + p1).length; a1 > 0; a1--) { +b1.value.pop(); +b1._monitorUpToDate = false; +if (isStuck()) yield; +} +b2.value = (("" + b2.value) + listContents(b1)); +b2.value = (("" + b2.value) + ("" + p2)); +b1.value = []; +} +if (isStuck()) yield; +} +b2.value = (("" + b2.value) + listContents(b1)); +return ""; +}; }) + +// Sprite1 ZFAIL %s +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ_FAIL_ (p0) { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "bY", null); +yield* executeInCompatibilityLayer({"MESSAGE":("fail " + "0"),}, b0, false, false, "=", null); +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "b!", null); +runtime.stopAll(); +retire(); yield; +return ""; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/forkphorus-tangent.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/forkphorus-tangent.sb3.tw-snapshot new file mode 100644 index 00000000000..b2ccf9ce3a3 --- /dev/null +++ b/test/snapshot/__snapshots__/warp-timer/forkphorus-tangent.sb3.tw-snapshot @@ -0,0 +1,56 @@ +// TW Snapshot +// Input SHA-256: 1446684578b41ff41cf29fbe14696ef717cca636e8d46babd7d9dec6df723a33 + +// Sprite1 script +(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); +const b0 = runtime.getOpcodeFunction("looks_say"); +return function* genXYZ () { +yield* executeInCompatibilityLayer({"MESSAGE":"plan 15",}, b0, false, false, "p", null); +if (compareEqual(tan(0), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 0",}, b0, false, false, "O", null); +} +if (((tan(90) || 0) === Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 90",}, b0, false, false, "G", null); +} +if (compareEqual(tan(180), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 180",}, b0, false, false, "I", null); +} +if (((tan(270) || 0) === -Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 270",}, b0, false, false, "K", null); +} +if (compareEqual(tan(360), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 360",}, b0, false, false, "M", null); +} +if (((tan(450) || 0) === Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 450",}, b0, false, false, "Q", null); +} +if (compareEqual(tan(540), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 540",}, b0, false, false, "S", null); +} +if (((tan(630) || 0) === -Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 630",}, b0, false, false, "U", null); +} +if (compareEqual(tan(720), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 720",}, b0, false, false, "W", null); +} +if (((tan(810) || 0) === Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass 810",}, b0, false, false, "Y", null); +} +if (((tan(-90) || 0) === -Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -90",}, b0, false, false, "0", null); +} +if (compareEqual(tan(-180), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -180",}, b0, false, false, "2", null); +} +if (((tan(-270) || 0) === Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -270",}, b0, false, false, "4", null); +} +if (compareEqual(tan(-360), 0)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -360",}, b0, false, false, "6", null); +} +if (((tan(-450) || 0) === -Infinity)) { +yield* executeInCompatibilityLayer({"MESSAGE":"pass -450",}, b0, false, false, "9", null); +} +yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "8", null); +retire(); return; +}; }) diff --git a/test/snapshot/__snapshots__/warp-timer/tw-loop-custom-reporter.sb3.tw-snapshot b/test/snapshot/__snapshots__/warp-timer/tw-loop-custom-reporter.sb3.tw-snapshot deleted file mode 100644 index a606d8595fd..00000000000 --- a/test/snapshot/__snapshots__/warp-timer/tw-loop-custom-reporter.sb3.tw-snapshot +++ /dev/null @@ -1,27 +0,0 @@ -// TW Snapshot -// Input SHA-256: 360d8b29e0e690dda9e91faed6881057d1f38d98258ed8e11c75bdd30536b560 - -// Sprite1 script -(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); -const b0 = runtime.getOpcodeFunction("looks_say"); -const b1 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"]; -return function* genXYZ () { -yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, null, null); -b1.value = 0; -for (var a0 = (+thread.procedures["Zblock name"]() || 0); a0 >= 0.5; a0--) { -b1.value = ((+b1.value || 0) + 1); -yield; -} -if (((+b1.value || 0) === 4)) { -yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, null, null); -} -yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, null, null); -retire(); return; -}; }) - -// Sprite1 block name -(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage(); -return function funXYZ_block_name () { -return 4; -return ""; -}; })