diff --git a/Tomlet.Tests/CommentSerializationTests.cs b/Tomlet.Tests/CommentSerializationTests.cs index cf733db..f53aa9f 100644 --- a/Tomlet.Tests/CommentSerializationTests.cs +++ b/Tomlet.Tests/CommentSerializationTests.cs @@ -51,7 +51,7 @@ public void CommentsOnTablesWork() [table] # This is an inline comment key = ""value"" # Inline comment on value"; - Assert.Equal(expected, doc.SerializedValue.Trim().ReplaceLineEndings()); + Assert.Equal(expected.ReplaceLineEndings(), doc.SerializedValue.Trim().ReplaceLineEndings()); } [Fact] @@ -84,7 +84,7 @@ public void CommentsOnTableArraysWork() [[table-array]] # This is an inline comment on the table key = ""value"" # Inline comment on value".Trim(); - Assert.Equal(expected, doc.SerializedValue.Trim().ReplaceLineEndings()); + Assert.Equal(expected.ReplaceLineEndings(), doc.SerializedValue.Trim().ReplaceLineEndings()); } [Fact] @@ -102,7 +102,7 @@ public void CommentsOnPrimitiveArraysWork() 1, 2, # This is an inline comment on the second value of the array 3, -]"; +]".ReplaceLineEndings(); //Replace tabs with spaces because this source file uses spaces var actual = doc.SerializedValue.Trim().Replace("\t", " ").ReplaceLineEndings(); diff --git a/Tomlet.Tests/ObjectToTomlDocTests.cs b/Tomlet.Tests/ObjectToTomlDocTests.cs index dc9dd70..8665b74 100644 --- a/Tomlet.Tests/ObjectToTomlDocTests.cs +++ b/Tomlet.Tests/ObjectToTomlDocTests.cs @@ -40,11 +40,11 @@ public void SerializationRecptsOverridingFieldsUsingNewKeyword() var expectedResult = @"OverwrittenField = ""this should be overwritten, not 'default value' as set in superclass."" NotOverwrittenSubclassField = ""this is a non-overwritten field, defined only in the subclass."" NotOverwrittenSuperclassField = ""this is a non-overwritten field, defined only in the superclass."" -".Replace("\r", ""); +"; var tomlDoc = TomletMain.DocumentFrom(testObject); - Assert.Equal(expectedResult, tomlDoc.SerializedValue); + Assert.Equal(expectedResult.ReplaceLineEndings(), tomlDoc.SerializedValue.ReplaceLineEndings()); } [Fact] diff --git a/Tomlet.Tests/TomlTableArrayTests.cs b/Tomlet.Tests/TomlTableArrayTests.cs index 4d19557..026afd3 100644 --- a/Tomlet.Tests/TomlTableArrayTests.cs +++ b/Tomlet.Tests/TomlTableArrayTests.cs @@ -106,7 +106,7 @@ public void TableArraySerializationWorks() [[array]] name = ""a"" value = { a = ""b"", c = ""d"" } -".Trim(); +".Trim().ReplaceLineEndings(); Assert.Equal(expectedResult, tomlString); } @@ -146,7 +146,7 @@ public void TablesWithNestedArraysHaveCorrectWhitespace() [[Root.Array]] A = ""C"" -B = ""D""", str.Trim().ReplaceLineEndings()); +B = ""D""".ReplaceLineEndings(), str.Trim().ReplaceLineEndings()); } } } \ No newline at end of file