Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

test(conformance): remove fixture generator test option

morlutoea853cebde56
diff --git a/scripts/lib/conformance-fixtures.d.mts b/scripts/lib/conformance-fixtures.d.mts
index 06b5ae514..607c572f2 100644
--- a/scripts/lib/conformance-fixtures.d.mts
+++ b/scripts/lib/conformance-fixtures.d.mts
@@ -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;
diff --git a/scripts/lib/conformance-fixtures.mjs b/scripts/lib/conformance-fixtures.mjs
index 4f82fb242..5b74ad9e5 100644
--- a/scripts/lib/conformance-fixtures.mjs
+++ b/scripts/lib/conformance-fixtures.mjs
@@ -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}; }`,
);
diff --git a/tests/conformance/providers/conformanceFixtures.test.ts b/tests/conformance/providers/conformanceFixtures.test.ts
index bfe584354..a44e8077d 100644
--- a/tests/conformance/providers/conformanceFixtures.test.ts
+++ b/tests/conformance/providers/conformanceFixtures.test.ts
@@ -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", () => {