From ab26527e7a2430ff04d590aee885a03305b06727 Mon Sep 17 00:00:00 2001 From: Benjamin Schaaf Date: Sun, 2 Jun 2019 22:54:59 +1000 Subject: [PATCH] Fix compiling tests/vibe.core.process.d for versions < 2080 --- tests/vibe.core.process.d | 52 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/tests/vibe.core.process.d b/tests/vibe.core.process.d index a6a84bd..fa195a6 100644 --- a/tests/vibe.core.process.d +++ b/tests/vibe.core.process.d @@ -5,8 +5,6 @@ dependency "vibe-core" path="../" +/ module test; -static if (__VERSION__ >= 2080) { - import core.thread; import vibe.core.log; import vibe.core.core; @@ -179,32 +177,32 @@ void testLineEndings() void main() { - runTask({ - auto tasks = [ - &testEcho, - &testCat, - &testStderr, - &testRandomDeath, - &testIgnoreSigterm, - &testSimpleShell, - &testLineEndings, - ].map!(fn => runTask({ - try { - fn(); - } catch (Exception e) { - logError("%s", e); - throw e; + static if (__VERSION__ >= 2080) { + runTask({ + auto tasks = [ + &testEcho, + &testCat, + &testStderr, + &testRandomDeath, + &testIgnoreSigterm, + &testSimpleShell, + &testLineEndings, + ].map!(fn => runTask({ + try { + fn(); + } catch (Exception e) { + logError("%s", e); + throw e; + } + })); + + foreach (task; tasks) { + task.join(); } - })); - foreach (task; tasks) { - task.join(); - } - - exitEventLoop(); - }); - - runEventLoop(); -} + exitEventLoop(); + }); + runEventLoop(); + } }