提交 1ac8df9c 编写于 作者: A Andy Gocke

Move resource string from C# to VB, where it was supposed to be, and use proper test methods

上级 440b3961
......@@ -7216,15 +7216,6 @@ internal class CSharpResources {
}
}
/// <summary>
/// Looks up a localized string similar to Public sign was specified and requires a public key, but no public key was specified.
/// </summary>
internal static string ERR_PublicSignNoKey {
get {
return ResourceManager.GetString("ERR_PublicSignNoKey", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The range variable &apos;{0}&apos; has already been declared.
/// </summary>
......
......@@ -3794,8 +3794,8 @@ You should consider suppressing the warning only if you're sure that you don't w
<data name="ERR_SignButNoPrivateKey" xml:space="preserve">
<value>Key file '{0}' is missing the private key needed for signing</value>
</data>
<data name="ERR_PublicSignNoKey" xml:space="preserve">
<value>Public sign was specified and requires a public key, but no public key was specified</value>
<data name="ERR_PublicSignButNoKey" xml:space="preserve">
<value>Public signing was specified and requires a public key, but no public key was specified.</value>
</data>
<data name="WRN_DelaySignButNoKey" xml:space="preserve">
<value>Delay signing was specified and requires a public key, but no public key was specified</value>
......@@ -4666,9 +4666,6 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<data name="ERR_InvalidPathMap" xml:space="preserve">
<value>The pathmap option was incorrectly formatted.</value>
</data>
<data name="ERR_PublicSignButNoKey" xml:space="preserve">
<value>Public signing was specified and requires a public key, but no public key was specified.</value>
</data>
<data name="ERR_InvalidReal" xml:space="preserve">
<value>Invalid real literal.</value>
</data>
......
......@@ -9144,6 +9144,15 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Public sign was specified and requires a public key, but no public key was specified.
'''</summary>
Friend ReadOnly Property ERR_PublicSignNoKey() As String
Get
Return ResourceManager.GetString("ERR_PublicSignNoKey", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &apos;:&apos; is not allowed. XML qualified names cannot be used in this context..
'''</summary>
......
......@@ -4295,6 +4295,9 @@
<data name="ERR_FriendRefSigningMismatch" xml:space="preserve">
<value>Friend access was granted by '{0}', but the strong name signing state of the output assembly does not match that of the granting assembly.</value>
</data>
<data name="ERR_PublicSignNoKey" xml:space="preserve">
<value>Public sign was specified and requires a public key, but no public key was specified</value>
</data>
<data name="WRN_DelaySignButNoKey" xml:space="preserve">
<value>Delay signing was specified and requires a public key, but no public key was specified.</value>
</data>
......
......@@ -1664,7 +1664,11 @@ End Class
</file>
</compilation>, options:=options
)
comp.VerifyDiagnostics(Diagnostic(ERRID.ERR_PublicSignNoKey).WithLocation(1, 1))
AssertTheseDiagnostics(comp,
<errors>
BC37254: Public sign was specified and requires a public key, but no public key was specified
</errors>)
Assert.True(comp.Options.PublicSign)
Assert.True(comp.Assembly.PublicKey.IsDefaultOrEmpty)
End Sub
......@@ -1731,8 +1735,11 @@ End Class
Dim options = TestOptions.ReleaseDll.WithCryptoKeyFile(snk.Path).WithPublicSign(True)
Dim comp = CreateCompilationWithMscorlib(source, options:=options)
comp.VerifyDiagnostics(
Diagnostic(ERRID.ERR_CmdOptionConflictsSource).WithArguments("System.Reflection.AssemblyDelaySignAttribute", "PublicSign").WithLocation(1, 1))
AssertTheseDiagnostics(comp,
<errors>
BC37207: Attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file conflicts with option 'PublicSign'.
</errors>)
Assert.True(comp.Options.PublicSign)
End Sub
<Fact>
......@@ -1751,9 +1758,13 @@ End Class
options:=options
)
comp.VerifyDiagnostics(
Diagnostic(ERRID.ERR_MutuallyExclusiveOptions).WithArguments("PublicSign", "DelaySign").WithLocation(1, 1))
AssertTheseDiagnostics(comp,
<errors>
BC2046: Compilation options 'PublicSign' and 'DelaySign' can't both be specified at the same time.
</errors>)
Assert.True(comp.Options.PublicSign)
Assert.True(comp.Options.DelaySign)
End Sub
<Fact, WorkItem(769840, "DevDiv")>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册