Skip to content

Commit 52c68e1

Browse files
authored
fix(Tests): Replace '\n' with Environment.NewLine to fix unit tests on Windows (#22)
Solution for #21
1 parent 627744f commit 52c68e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/M31.FluentApi.Tests/Components/CodeBuilding/CodeBuildingTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private static CodeFile CreateRobotsCodeFile()
2222
{
2323
Interface moveInterface = CreateIMoveInterface();
2424
Class robot = CreateRobotClass(moveInterface);
25-
CodeFile codeFile = new CodeFile("M31.FluentApi.Tests.Components", "\n");
25+
CodeFile codeFile = new CodeFile("M31.FluentApi.Tests.Components", System.Environment.NewLine);
2626
codeFile.AddUsing("System.Collections.Generic");
2727
codeFile.AddDefinition(robot);
2828
codeFile.AddDefinition(moveInterface);

src/M31.FluentApi.Tests/Helpers/ManualGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ internal static GeneratorOutputs RunGenerators(IReadOnlyCollection<string> sourc
4545
{
4646
CSharpCompilation compilation = GetCompilation(sourceCode);
4747
SourceGenerator generator = new SourceGenerator();
48-
SourceGenerator.GeneratorConfig.NewLineString = "\n";
48+
SourceGenerator.GeneratorConfig.NewLineString = Environment.NewLine;
4949

5050
CSharpGeneratorDriver.Create(generator)
5151
.RunGeneratorsAndUpdateCompilation(compilation,

0 commit comments

Comments
 (0)