Use rawWrite for writing test files in unit tests (#168)
This commit is contained in:
parent
cfe5a5dae7
commit
bf75a9b9d3
|
|
@ -108,7 +108,7 @@ unittest
|
|||
sac.allman_braces_check = Check.enabled;
|
||||
|
||||
// check common allman style violation
|
||||
assertAnalyzerWarningsDMD(`
|
||||
assertAnalyzerWarningsDMD(q{
|
||||
void testAllman()
|
||||
{
|
||||
while (true) { // [warn]: %s
|
||||
|
|
@ -146,7 +146,7 @@ unittest
|
|||
}
|
||||
}
|
||||
}
|
||||
`c.format(
|
||||
}c.format(
|
||||
AllManCheck.MESSAGE,
|
||||
AllManCheck.MESSAGE,
|
||||
AllManCheck.MESSAGE,
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ void assertAutoFix(string before, string after, const StaticAnalysisConfig confi
|
|||
remove(testFileName);
|
||||
}
|
||||
|
||||
f.write(before);
|
||||
f.rawWrite(before);
|
||||
f.close();
|
||||
|
||||
auto dmdModule = parseDmdModule(file, before);
|
||||
|
|
@ -400,7 +400,7 @@ void assertAnalyzerWarningsDMD(string code, const StaticAnalysisConfig config, b
|
|||
remove(testFileName);
|
||||
}
|
||||
|
||||
f.write(code);
|
||||
f.rawWrite(code);
|
||||
f.close();
|
||||
|
||||
auto dmdModule = parseDmdModule(file, code);
|
||||
|
|
|
|||
Loading…
Reference in New Issue