mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
test: strengthen Kuna and managed boundary result oracles
This commit is contained in:
1 parent
8661bb38d5
commit
c1e3d7dc6e
2 files changed
+17
-10
No files matched your search
@@ -85,7 +85,19 @@ it("skips members it does not interpret without retaining them", async () => {
|
||||
strings: [{ ...row, score: 1, origin: { tool: [1] } }],
|
||||
}).replace('"functions":[]', '"functions":[],"__proto__":{"text":1}'),
|
||||
);
|
||||
expect(result).toMatchObject({ ok: true, value: { items: [{}] } });
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.items).toEqual([
|
||||
{
|
||||
address: "0x20000000000001",
|
||||
value: "a\nΔelta",
|
||||
string: {
|
||||
encoding: "utf8",
|
||||
encoding_status: "observed",
|
||||
termination: "present_or_not_required",
|
||||
byte_length: 9,
|
||||
},
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
|
||||
@@ -3,7 +3,6 @@ import { buildManagedPeFixture } from "../../../../scripts/fixtures/managed/pe.m
|
||||
import { managedPeFixtureTarget } from "../../../../src/dotnet/ManagedPe.fixture.js";
|
||||
import { inspectManagedMembersBytes } from "../../../../src/dotnet/ManagedMemberInspector.js";
|
||||
import { createEvidence } from "../../../../src/domain/evidence.js";
|
||||
import { comparisonLimitations } from "../../../../src/domain/managed/managedMemberComparisonCoverage.js";
|
||||
import { executeManagedMemberComparison } from "../../../../src/application/managed/ManagedMemberComparisonService.js";
|
||||
import { managedMemberComparisonResultSchema } from "../../../../src/domain/managed/managedMemberComparison.js";
|
||||
|
||||
@@ -57,9 +56,9 @@ it("keeps field comparison policy and delivers its owning limitation for changed
|
||||
},
|
||||
}),
|
||||
]);
|
||||
expect(comparison.limitations).toEqual(
|
||||
expect.arrayContaining(comparisonLimitations(left.report, right.report)),
|
||||
);
|
||||
const constantLimitation =
|
||||
"Field Constant-table defaults are not compared; field matching and change detection cover names, flags and signatures only.";
|
||||
expect(comparison.limitations).toContain(constantLimitation);
|
||||
const ordinary = observe("", false, 1);
|
||||
const otherOrdinary = observe("", false, 2);
|
||||
expect(ordinary.report.fields[0]?.constant).toBeNull();
|
||||
@@ -71,9 +70,5 @@ it("keeps field comparison policy and delivers its owning limitation for changed
|
||||
const baselineComparison = managedMemberComparisonResultSchema.parse(
|
||||
baseline.value.evidence.normalized_result,
|
||||
);
|
||||
expect(
|
||||
comparison.limitations.filter(
|
||||
(limitation) => !baselineComparison.limitations.includes(limitation),
|
||||
),
|
||||
).toHaveLength(1);
|
||||
expect(baselineComparison.limitations).not.toContain(constantLimitation);
|
||||
});
|
||||
Reference in new issue
Block a user