From f9fba3a011386dc07912090145e814f690babc35 Mon Sep 17 00:00:00 2001 From: Alien Date: Wed, 14 Feb 2018 01:57:57 -0500 Subject: [PATCH] Make splitting of lines for testing agnostic of a specific style. (#546) Make splitting of lines for testing agnostic of a specific style. merged-on-behalf-of: BBasile --- src/analysis/helpers.d | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/analysis/helpers.d b/src/analysis/helpers.d index 949a4e4..f379118 100644 --- a/src/analysis/helpers.d +++ b/src/analysis/helpers.d @@ -50,7 +50,6 @@ void assertAnalyzerWarnings(string code, const StaticAnalysisConfig config, { import analysis.run : parseModule; import dparse.lexer : StringCache, Token; - import std.ascii : newline; StringCache cache = StringCache(StringCache.defaultBucketCount); RollbackAllocator r; @@ -61,7 +60,7 @@ void assertAnalyzerWarnings(string code, const StaticAnalysisConfig config, // Run the code and get any warnings MessageSet rawWarnings = analyze("test", m, config, moduleCache, tokens); - string[] codeLines = code.split(newline); + string[] codeLines = code.splitLines(); // Get the warnings ordered by line string[size_t] warnings;