From be14f6c87cb3eeb9e3a2ac93802c9c236c191aa5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 29 Jun 2017 11:38:27 +0200 Subject: Pass entire BMI graph, not only direct imports and re-exports All current implementations require access to the entire graph (though Clang embeds the file references so we don't need to pass the options). --- tests/cc/modules/testscript | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'tests/cc') diff --git a/tests/cc/modules/testscript b/tests/cc/modules/testscript index d35de50..1fb1345 100644 --- a/tests/cc/modules/testscript +++ b/tests/cc/modules/testscript @@ -285,6 +285,45 @@ if ($cxx.id.type != "clang") EOI } +: import +: +: Test module import. Currently, all the implementation require access to the +: entire, recursively-explored list of BMIs. +: +{ + # Note: using VC export module fixup support. + + +cat <=base.mxx + export module foo.base; + import foo.core; + export int g (int i) {return f (i);} + EOI + + +cat <=extra.mxx + export module foo.extra; + import foo.base; + export int h (int i) {return g (i);} + EOI + + : basic + : + ln -s ../base.mxx ../../core.mxx ../../core.cxx ./; + cat <=driver.cxx; + import foo.base; + int main (int argc, char*[]) {return g (argc);} + EOI + $* test clean <'exe{test}: cxx{driver core} mxx{core base}' + + : recursive + : + ln -s ../base.mxx ../extra.mxx ../../core.mxx ../../core.cxx ./; + cat <=driver.cxx; + import foo.extra; + int main (int argc, char*[]) {return h (argc);} + EOI + $* test clean <'exe{test}: cxx{driver core} mxx{core base extra}' +} + : resolve-change : : Test detection of module name to BMI resolution change. -- cgit v1.1