test(conformance): remove fixture generator test option

This commit is contained in:
morluto
2026-09-29 18:00:47 +08:00
parent 9ddf22e196
commit ea853cebde
3 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ export const HOPPER_C_ORACLE: Readonly<{
globalName: "rea_c_global";
}>;
export function sha256(value: string | Uint8Array): string;
export function generateLargeFixture(count?: number): string;
export function generateLargeFixture(): string;
export function sourceDigest(
sources: readonly { readonly path: string; readonly content: string }[],
): string;
+2 -4
View File
@@ -15,11 +15,9 @@ export const HOPPER_C_ORACLE = Object.freeze({
export const sha256 = (value) =>
createHash("sha256").update(value).digest("hex");
export const generateLargeFixture = (count = LARGE_FIXTURE_COUNT) => {
if (!Number.isInteger(count) || count < 1)
throw new Error("Fixture count must be a positive integer");
export const generateLargeFixture = () => {
const declarations = Array.from(
{ length: count },
{ length: LARGE_FIXTURE_COUNT },
(_, index) =>
`__attribute__((noinline, used)) int rea_inventory_${String(index).padStart(4, "0")}(void) { puts("REA_INVENTORY_${String(index).padStart(4, "0")}"); return ${index}; }`,
);
@@ -17,9 +17,6 @@ describe("source-built conformance fixtures", () => {
expect(first).toContain(
`rea_inventory_${String(LARGE_FIXTURE_COUNT - 1).padStart(4, "0")}`,
);
expect(() => generateLargeFixture(0)).toThrow(
"Fixture count must be a positive integer",
);
});
it("hashes source manifests independently of input ordering", () => {