From 0e9c042d213b9d6d5e346b6d47f66f2e02d6dac2 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Fri, 17 Mar 2023 09:18:17 +0200 Subject: [PATCH] Unit tests - Cleaned up --- source/birchwood/protocol/messages.d | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/birchwood/protocol/messages.d b/source/birchwood/protocol/messages.d index c088e70..0f405de 100644 --- a/source/birchwood/protocol/messages.d +++ b/source/birchwood/protocol/messages.d @@ -300,10 +300,13 @@ public final class Message private string[] ppPairs; - unittest + version(unittest) { import std.stdio; + } + unittest + { string testInput = "A:=1 A=2 :Hello this is text"; writeln("Input: ", testInput); @@ -323,8 +326,6 @@ public final class Message unittest { - import std.stdio; - string testInput = ":Hello this is text"; bool hasTrailer; string[] splitted = splitting(testInput, hasTrailer);