Skip to content

Commit c372e92

Browse files
committed
Add test case for 6a37fee
1 parent 5a90e13 commit c372e92

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed
3.28 KB
Binary file not shown.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// TW Snapshot
2+
// Input SHA-256: 95d4c128e84ee992b48ed20653ba70b0f6c2d404c4f7088fa654676cd6b7c53c
3+
4+
// Sprite1 script
5+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
6+
const b0 = runtime.getOpcodeFunction("looks_say");
7+
const b1 = stage.variables[";~q(!vt3c.Jrz2M]ZMy]"];
8+
const b2 = stage.variables[",23fjp~KN1aMG|;66K@Z"];
9+
return function* genXYZ () {
10+
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null);
11+
b1.value = [];
12+
b1.value.push((1 + 2));
13+
b1._monitorUpToDate = false;
14+
b1.value.push((3 + 4));
15+
b1._monitorUpToDate = false;
16+
b1.value.push("final");
17+
b1._monitorUpToDate = false;
18+
thread.procedures["Wtest"]();
19+
if ((b2.value === 4)) {
20+
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "u", null);
21+
}
22+
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "t", null);
23+
retire(); return;
24+
}; })
25+
26+
// Sprite1 Wtest
27+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
28+
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
29+
const b1 = stage.variables[",23fjp~KN1aMG|;66K@Z"];
30+
const b2 = stage.variables[";~q(!vt3c.Jrz2M]ZMy]"];
31+
return function funXYZ_test () {
32+
b0.value = "";
33+
b1.value = 1;
34+
while (!(("" + b0.value).toLowerCase() === "final".toLowerCase())) {
35+
b0.value = (b2.value[b1.value - 1] ?? "");
36+
b1.value = (b1.value + 1);
37+
}
38+
return "";
39+
}; })
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// TW Snapshot
2+
// Input SHA-256: 95d4c128e84ee992b48ed20653ba70b0f6c2d404c4f7088fa654676cd6b7c53c
3+
4+
// Sprite1 script
5+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
6+
const b0 = runtime.getOpcodeFunction("looks_say");
7+
const b1 = stage.variables[";~q(!vt3c.Jrz2M]ZMy]"];
8+
const b2 = stage.variables[",23fjp~KN1aMG|;66K@Z"];
9+
return function* genXYZ () {
10+
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "j", null);
11+
b1.value = [];
12+
b1.value.push((1 + 2));
13+
b1._monitorUpToDate = false;
14+
b1.value.push((3 + 4));
15+
b1._monitorUpToDate = false;
16+
b1.value.push("final");
17+
b1._monitorUpToDate = false;
18+
yield* thread.procedures["Wtest"]();
19+
if (((+b2.value || 0) === 4)) {
20+
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "u", null);
21+
}
22+
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "t", null);
23+
retire(); return;
24+
}; })
25+
26+
// Sprite1 Wtest
27+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
28+
const b0 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
29+
const b1 = stage.variables[",23fjp~KN1aMG|;66K@Z"];
30+
const b2 = stage.variables[";~q(!vt3c.Jrz2M]ZMy]"];
31+
return function* genXYZ_test () {
32+
b0.value = "";
33+
b1.value = 1;
34+
while (!(("" + b0.value).toLowerCase() === "final".toLowerCase())) {
35+
b0.value = listGet(b2.value, b1.value);
36+
b1.value = ((+b1.value || 0) + 1);
37+
if (isStuck()) yield;
38+
}
39+
return "";
40+
}; })

0 commit comments

Comments
 (0)