From 2a335eb05de3d26eb131a2112b7fcc2124def3b7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 5 Jun 2019 08:52:33 +0200 Subject: Adjust GCC module mapper to new protocol --- tests/cc/modules/headers.testscript | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'tests/cc') diff --git a/tests/cc/modules/headers.testscript b/tests/cc/modules/headers.testscript index 4b8067f..4fb9a42 100644 --- a/tests/cc/modules/headers.testscript +++ b/tests/cc/modules/headers.testscript @@ -9,15 +9,36 @@ +$headers || exit -: include-translation -: -cat <=core.hxx; +# Common source files that are symlinked in the test directories if used. +# ++cat <=core.hxx #ifdef CORE_IN # error macro isolation #endif #define CORE_OUT 1 inline int f () {return 1;} EOI + +: import +: +#ln -s ../core.hxx ./; @@ why isn't working? +cp ../core.hxx ./; +cat <=driver.cxx; + #define CORE_IN 1 + import "core.hxx"; + #ifndef CORE_OUT + # error macro export + #endif + int main () {return f () - CORE_OUT;} + EOI +$* test clean <=driver.cxx; #define CORE_IN 1 #include "core.hxx" @@ -26,6 +47,12 @@ cat <=driver.cxx; #endif int main () {return f () - CORE_OUT;} EOI -$* test clean config.cxx.importable_headers="$~/core.hxx" &$~/../build/cc/*** <