mirror of
https://github.com/morluto/rea.git
synced 2026-10-12 02:19:24 +00:00
test(conformance): remove fixture generator test option
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user