diff --git a/src/coreclr/tools/ILVerification.Tests/VerificationResultTests.cs b/src/coreclr/tools/ILVerification.Tests/VerificationResultTests.cs index 10cfc04faddd9b..73d02ab57e324a 100644 --- a/src/coreclr/tools/ILVerification.Tests/VerificationResultTests.cs +++ b/src/coreclr/tools/ILVerification.Tests/VerificationResultTests.cs @@ -1,6 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.Globalization; +using System.Linq; +using System.Resources; using ILVerify; using Xunit; @@ -17,5 +21,16 @@ public static void ArgumentLookupOnResultWithoutArguments() Assert.Equal(0, offset); Assert.Equal(0, result.GetArgumentValue("Offset")); } + + [Fact] + public static void EveryErrorHasMessage() + { + // Verifier looks up the message of an error by its name, and falls back to the name. + var strings = new ResourceManager("ILVerification.Strings", typeof(Verifier).Assembly); + VerifierError[] missing = Enum.GetValues() + .Where(e => e != VerifierError.None && string.IsNullOrEmpty(strings.GetString(e.ToString(), CultureInfo.InvariantCulture))) + .ToArray(); + Assert.Empty(missing); + } } } diff --git a/src/coreclr/tools/ILVerification/Strings.resx b/src/coreclr/tools/ILVerification/Strings.resx index 854d60df120939..6424bbd88f66b5 100644 --- a/src/coreclr/tools/ILVerification/Strings.resx +++ b/src/coreclr/tools/ILVerification/Strings.resx @@ -264,7 +264,7 @@ Cannot change initonly field outside its .ctor. - + ldftn/ldvirtftn not allowed on .ctor. @@ -408,6 +408,9 @@ Void ret type expected for tail call. + + Stack not empty after tail call. + The 'this' parameter to the call must be the calling method's 'this' parameter.