# file : tests/cc/modules/headers.testscript # copyright : Copyright (c) 2014-2019 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file # Test header units. # .include common.testscript +$headers || exit # 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" #ifndef CORE_OUT # error macro export #endif int main () {return f () - CORE_OUT;} EOI $* test clean config.cxx.importable_headers="$~/core.hxx" <