test(native): expect only toolchain-portable Swift manglings to demangle
The macOS 15 runner's swift-demangle predates Embedded Swift, so valid $e symbols stay unchanged there. Keep $e and _$e in the undecodable half only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a3cea599fb
commit
546d1689b6
|
|
@ -78,13 +78,16 @@ describe.skipIf(process.platform !== "darwin")(
|
|||
);
|
||||
await copyFile("/usr/bin/true", target);
|
||||
const client = await openProductionTarget(mcp, onTestFinished, target);
|
||||
const prefixes = ["_T0", "$S", "_$S", "$e", "_$e"];
|
||||
// Embedded Swift ($e) decoding depends on the installed toolchain, so
|
||||
// only manglings every supported demangler decodes are expected valid.
|
||||
const decodable = ["_T0", "$S", "_$S"];
|
||||
const prefixes = [...decodable, "$e", "_$e"];
|
||||
|
||||
const called = await client.callTool({
|
||||
name: "demangle_swift",
|
||||
arguments: {
|
||||
symbols: [
|
||||
...prefixes.map((prefix) => `${prefix}4main3FooV`),
|
||||
...decodable.map((prefix) => `${prefix}4main3FooV`),
|
||||
...prefixes.map((prefix) => `${prefix}Bogus`),
|
||||
"_Tprintf",
|
||||
],
|
||||
|
|
@ -96,7 +99,7 @@ describe.skipIf(process.platform !== "darwin")(
|
|||
.parse(called.structuredContent)
|
||||
.normalized_result.symbols.map(({ status }) => status),
|
||||
).toEqual([
|
||||
...prefixes.map(() => "demangled"),
|
||||
...decodable.map(() => "demangled"),
|
||||
...prefixes.map(() => "invalid"),
|
||||
"unchanged",
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue