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 <BBasile@users.noreply.github.com>
This commit is contained in:
parent
3f3028d7f2
commit
f9fba3a011
|
@ -50,7 +50,6 @@ void assertAnalyzerWarnings(string code, const StaticAnalysisConfig config,
|
||||||
{
|
{
|
||||||
import analysis.run : parseModule;
|
import analysis.run : parseModule;
|
||||||
import dparse.lexer : StringCache, Token;
|
import dparse.lexer : StringCache, Token;
|
||||||
import std.ascii : newline;
|
|
||||||
|
|
||||||
StringCache cache = StringCache(StringCache.defaultBucketCount);
|
StringCache cache = StringCache(StringCache.defaultBucketCount);
|
||||||
RollbackAllocator r;
|
RollbackAllocator r;
|
||||||
|
@ -61,7 +60,7 @@ void assertAnalyzerWarnings(string code, const StaticAnalysisConfig config,
|
||||||
|
|
||||||
// Run the code and get any warnings
|
// Run the code and get any warnings
|
||||||
MessageSet rawWarnings = analyze("test", m, config, moduleCache, tokens);
|
MessageSet rawWarnings = analyze("test", m, config, moduleCache, tokens);
|
||||||
string[] codeLines = code.split(newline);
|
string[] codeLines = code.splitLines();
|
||||||
|
|
||||||
// Get the warnings ordered by line
|
// Get the warnings ordered by line
|
||||||
string[size_t] warnings;
|
string[size_t] warnings;
|
||||||
|
|
Loading…
Reference in New Issue