diff options
Diffstat (limited to 'src/ProtocolBuffers.Test/TextFormatTest.cs')
-rw-r--r-- | src/ProtocolBuffers.Test/TextFormatTest.cs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/ProtocolBuffers.Test/TextFormatTest.cs b/src/ProtocolBuffers.Test/TextFormatTest.cs index a8e0de4d..d0664a0c 100644 --- a/src/ProtocolBuffers.Test/TextFormatTest.cs +++ b/src/ProtocolBuffers.Test/TextFormatTest.cs @@ -34,6 +34,8 @@ using System.IO; using System.Text; using Google.ProtocolBuffers.TestProtos; using NUnit.Framework; +using System.Globalization; +using System.Threading; namespace Google.ProtocolBuffers { [TestFixture] @@ -82,8 +84,10 @@ namespace Google.ProtocolBuffers { /// </summary> [Test] public void PrintMessage() { - string text = TextFormat.PrintToString(TestUtil.GetAllSet()); - Assert.AreEqual(AllFieldsSetText.Replace("\r\n", "\n"), text.Replace("\r\n", "\n")); + TestUtil.TestInMultipleCultures(() => { + string text = TextFormat.PrintToString(TestUtil.GetAllSet()); + Assert.AreEqual(AllFieldsSetText.Replace("\r\n", "\n"), text.Replace("\r\n", "\n")); + }); } /// <summary> @@ -213,9 +217,11 @@ namespace Google.ProtocolBuffers { [Test] public void Parse() { - TestAllTypes.Builder builder = TestAllTypes.CreateBuilder(); - TextFormat.Merge(AllFieldsSetText, builder); - TestUtil.AssertAllFieldsSet(builder.Build()); + TestUtil.TestInMultipleCultures(() => { + TestAllTypes.Builder builder = TestAllTypes.CreateBuilder(); + TextFormat.Merge(AllFieldsSetText, builder); + TestUtil.AssertAllFieldsSet(builder.Build()); + }); } [Test] |