From 16028a8f62436750857f2320617176cadfbb3d6a Mon Sep 17 00:00:00 2001 From: Prajwal S N Date: Fri, 29 Dec 2023 13:24:03 +0530 Subject: [PATCH] fix: store unit tests in AST Signed-off-by: Prajwal S N --- src/dfmt/formatter.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index 7081c03..329407a 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -14,6 +14,7 @@ import dmd.astcodegen; import dmd.transitivevisitor; import dmd.permissivevisitor; import dmd.frontend; +import dmd.globals; import dfmt.ast; import dfmt.config; import std.array; @@ -33,6 +34,7 @@ bool format(string source_desc, ubyte[] buffer, File.LockingTextWriter output, Config* formatterConfig) { initDMD(); + global.params.useUnitTests = true; auto module_ = parseModule(source_desc)[0]; scope v = new FormatVisitor(output, formatterConfig); v.visit(module_);