Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/Compilers/Test/Core/Diagnostics/DiagnosticDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.PooledObjects;
using Microsoft.CodeAnalysis.Text;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Xunit;
using Roslyn.Test.Utilities;
using Microsoft.CodeAnalysis.PooledObjects;
using Microsoft.CodeAnalysis.CSharp;
using System.Collections.Immutable;

namespace Microsoft.CodeAnalysis.Test.Utilities
{
Expand Down Expand Up @@ -518,7 +519,7 @@ public static string GetAssertText(DiagnosticDescription[] expected, IEnumerable
for (i = 0; e.MoveNext(); i++)
{
Diagnostic d = e.Current;
string message = d.ToString();
string message = d.ToString(CultureInfo.InvariantCulture);
if (Regex.Match(message, @"{\d+}").Success)
{
Assert.True(false, "Diagnostic messages should never contain unsubstituted placeholders.\n " + message);
Expand All @@ -533,7 +534,7 @@ public static string GetAssertText(DiagnosticDescription[] expected, IEnumerable
{
Indent(assertText, indentDepth);
assertText.Append("// ");
assertText.AppendLine(d.ToString());
assertText.AppendLine(message);
var l = d.Location;
if (l.IsInSource)
{
Expand Down