diff options
Diffstat (limited to 'libbuild2/function.test.cxx')
-rw-r--r-- | libbuild2/function.test.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libbuild2/function.test.cxx b/libbuild2/function.test.cxx index c64bd0a..37ed5ff 100644 --- a/libbuild2/function.test.cxx +++ b/libbuild2/function.test.cxx @@ -15,6 +15,9 @@ #include <libbuild2/file-cache.hxx> #include <libbuild2/diagnostics.hxx> +#undef NDEBUG +#include <cassert> + using namespace std; namespace build2 @@ -41,13 +44,13 @@ namespace build2 // Fake build system driver, default verbosity. // init_diag (1); - init (nullptr, argv[0]); + init (nullptr, argv[0], true); // Serial execution. // scheduler sched (1); global_mutexes mutexes (1); - file_cache fcache; + file_cache fcache (true); context ctx (sched, mutexes, fcache); auto& functions (ctx.functions); @@ -112,7 +115,7 @@ namespace build2 else if (!a.empty ()) { names storage; - cout << reverse (a, storage); + cout << reverse (a, storage, true /* reduce */); } cout << endl; } @@ -121,7 +124,9 @@ namespace build2 try { - scope& s (ctx.global_scope.rw ()); + // Use temp scope for the private variable pool. + // + temp_scope s (ctx.global_scope.rw ()); parser p (ctx); p.parse_buildfile (cin, path_name ("buildfile"), &s, s); |