aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/parser.test.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc/parser.test.cxx')
-rw-r--r--libbuild2/cc/parser.test.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbuild2/cc/parser.test.cxx b/libbuild2/cc/parser.test.cxx
index e5b3f6a..0c023d3 100644
--- a/libbuild2/cc/parser.test.cxx
+++ b/libbuild2/cc/parser.test.cxx
@@ -45,13 +45,13 @@ namespace build2
unit u (p.parse (is, in));
unit_type ut (u.type);
- for (const module_import& m: u.module_info.imports)
- cout << (m.exported ? "export " : "")
- << "import " << m.name << ';' << endl;
-
if (ut == unit_type::module_iface || ut == unit_type::module_impl)
cout << (ut == unit_type::module_iface ? "export " : "")
<< "module " << u.module_info.name << ';' << endl;
+
+ for (const module_import& m: u.module_info.imports)
+ cout << (m.exported ? "export " : "")
+ << "import " << m.name << ';' << endl;
}
catch (const failed&)
{