Guard m98m99 mixed-sub-style staging

This commit is contained in:
2026-06-13 08:53:22 +08:00
parent 410e109e61
commit e953e5184c
3 changed files with 79 additions and 26 deletions

View File

@@ -7992,7 +7992,22 @@
].join("\n"),
);
const m98m99MixedSubStylePaths = [];
const m98m99MixedSubStyleFiles = [
"O...-called-with-O..._call.ngc",
"O...-ended-with-O..._endsub.ngc",
"O...-sub-called-with-M98.ngc",
"O...-sub-ended-with-M99.ngc",
];
const m98m99MixedSubStyleDir = await writeInterpRegressionFiles(
interp,
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
);
assertInterpRegressionStaging(
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
m98m99MixedSubStyleDir,
);
for (const mixedSubStyleFixture of [
{
name: "called_with_o_call",
@@ -8037,12 +8052,7 @@
print: "X FANUC",
},
]) {
const mixedSubStylePath = await writeInterpRegressionFile(
interp,
"m98m99/06-error-mixed-sub-styles",
mixedSubStyleFixture.file,
);
m98m99MixedSubStylePaths.push(mixedSubStylePath);
const mixedSubStylePath = `${m98m99MixedSubStyleDir}/${mixedSubStyleFixture.file}`;
const mixedSubStyleRun = runWithCapturedPrints(() =>
interp.runFile(mixedSubStylePath),
);
@@ -8069,12 +8079,6 @@
);
}
}
const m98m99MixedStagedNgcFiles = [
...m98m99MixedSubStylePaths,
].map((path) => path.replace("/work/browser-interp/m98m99/", ""));
if (m98m99MixedStagedNgcFiles.join(",") !== m98m99RegressionFiles.slice(5, 9).join(",")) {
throw new Error("browser_interp_m98m99_mixed_staging_manifest: list drift");
}
const m98m99NestedSubsPath = await writeInterpRegressionFile(
interp,

View File

@@ -2977,7 +2977,21 @@ verifyExpectedOutput(
].join("\n"),
);
const m98m99MixedSubStylePaths = [];
const m98m99MixedSubStyleFiles = [
"O...-called-with-O..._call.ngc",
"O...-ended-with-O..._endsub.ngc",
"O...-sub-called-with-M98.ngc",
"O...-sub-ended-with-M99.ngc",
];
const m98m99MixedSubStyleDir = writeInterpRegressionFiles(
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
);
assertInterpRegressionStaging(
"m98m99/06-error-mixed-sub-styles",
m98m99MixedSubStyleFiles,
m98m99MixedSubStyleDir,
);
for (const mixedSubStyleFixture of [
{
name: "called_with_o_call",
@@ -3022,11 +3036,7 @@ for (const mixedSubStyleFixture of [
print: "X FANUC",
},
]) {
const mixedSubStylePath = writeInterpRegressionFile(
"m98m99/06-error-mixed-sub-styles",
mixedSubStyleFixture.file,
);
m98m99MixedSubStylePaths.push(mixedSubStylePath);
const mixedSubStylePath = `${m98m99MixedSubStyleDir}/${mixedSubStyleFixture.file}`;
const mixedSubStyleRun = runWithCapturedPrints(() => interp.runFile(mixedSubStylePath));
verifyExpectedOutput(
`interp_m98m99_06_${mixedSubStyleFixture.name}_wasm`,
@@ -3051,13 +3061,6 @@ for (const mixedSubStyleFixture of [
);
}
}
assert.deepEqual(
m98m99MixedSubStylePaths,
m98m99RegressionFiles
.slice(5, 9)
.map((file) => `/work/interp/m98m99/${file}`),
"interp m98m99 mixed direct-file staging manifest drift",
);
const m98m99NestedSubsPath = writeInterpRegressionFile("m98m99/07-nested-subs", "test.ngc");
assertInterpRegressionFileStaging("m98m99/07-nested-subs", "test.ngc", m98m99NestedSubsPath);