From 79da7ea8fa063a7b82e00ce95c6c65ac078d9191 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Sun, 8 Nov 2026 00:17:59 +0800 Subject: [PATCH] test: clarify managed evidence limitations --- src/dotnet/ManagedMemberInspector.test.ts | 12 ++++++++---- src/dotnet/ManagedNativeBoundaryInspector.test.ts | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/dotnet/ManagedMemberInspector.test.ts b/src/dotnet/ManagedMemberInspector.test.ts index 3d0df59d3a..3842ebe585 100644 --- a/src/dotnet/ManagedMemberInspector.test.ts +++ b/src/dotnet/ManagedMemberInspector.test.ts @@ -3014,8 +3014,10 @@ describe("managed member type selection", () => { expect(result.call_edges).toEqual(everything.call_edges); expect(result.field_accesses).toEqual(everything.field_accesses); expect(result.coverage).toEqual(everything.coverage); - expect(result.limitations).toContain( - "Types, fields, methods, call edges, field accesses, and user strings cover only the selected declaring types; coverage describes that selection. Edge targets outside it keep their names but are not described.", + expect(result.limitations).toContainEqual( + expect.stringMatching( + /types.*fields.*methods.*call edges.*field accesses.*user strings.*only the selected declaring types.*targets outside.*names.*not described/iu, + ), ); }); @@ -3040,8 +3042,10 @@ describe("managed member type selection", () => { expect(result.coverage.state).toBe("partial"); // Its methods were never inspected, so neither were their literals. expect(result.user_strings?.state).toBe("partial"); - expect(result.limitations).toContain( - "1 TypeDef name(s) could not be read; a name in selection.unmatched_type_names may belong to one of them, so its absence is not observed.", + expect(result.limitations).toContainEqual( + expect.stringMatching( + /1 TypeDef name.*could not be read.*selection\.unmatched_type_names.*absence is not observed/iu, + ), ); }, ); diff --git a/src/dotnet/ManagedNativeBoundaryInspector.test.ts b/src/dotnet/ManagedNativeBoundaryInspector.test.ts index a49e4b2939..256e48440b 100644 --- a/src/dotnet/ManagedNativeBoundaryInspector.test.ts +++ b/src/dotnet/ManagedNativeBoundaryInspector.test.ts @@ -77,8 +77,10 @@ describe("managed native boundaries", () => { mixed_mode_or_native_header: true, }); expect(result.coverage).toMatchObject({ state: "complete", issues: [] }); - expect(result.limitations).toContain( - "P/Invoke rows prove managed import declarations only; this inspection does not verify that a native library, export, thunk, or provider-qualified function exists.", + expect(result.limitations).toContainEqual( + expect.stringMatching( + /P\/Invoke.*managed import declarations only.*does not verify.*native library.*export.*thunk.*provider.qualified function/iu, + ), ); });