From f173845810e2cbe4756af892b0bf308300301f06 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 10 Jul 2024 16:13:52 +0200 Subject: [PATCH] Run the native swift demangler tests on darwin-x64 too ##bin --- libr/bin/mangling/swift-sd.c | 2 +- test/db/archos/darwin-x86_64/swift | 43 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 test/db/archos/darwin-x86_64/swift diff --git a/libr/bin/mangling/swift-sd.c b/libr/bin/mangling/swift-sd.c index 25eece8eea934d..6b1c7b8b504f33 100644 --- a/libr/bin/mangling/swift-sd.c +++ b/libr/bin/mangling/swift-sd.c @@ -8,7 +8,7 @@ // R2R db/tools/rabin2 // set this to true for debugging purposes -#define USE_THIS_CODE 1 +#define USE_THIS_CODE 0 static R_TH_LOCAL int have_swift_demangle = -1; #if R2__UNIX__ diff --git a/test/db/archos/darwin-x86_64/swift b/test/db/archos/darwin-x86_64/swift new file mode 100644 index 00000000000000..ca20d8d2b5bc71 --- /dev/null +++ b/test/db/archos/darwin-x86_64/swift @@ -0,0 +1,43 @@ +NAME=swift demangling trylib false +FILE=- +CMDS=< (): , ) () +EOF +RUN + +NAME=swift demangling trylib true +FILE=- +CMDS=< (x: Swift.Int) -> Swift.Int +EOF +RUN + +NAME=swift demangling config var internal +FILE=- +CMDS=< (): , ) () +EOF +RUN + +NAME=swift demangling config var system library +FILE=- +CMDS=< (x: Swift.Int) -> Swift.Int +EOF +RUN