Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
61cde94a
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
61cde94a
编写于
10月 04, 2018
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up test failures
上级
d8461c09
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
33 addition
and
230 deletion
+33
-230
src/Compilers/CSharp/Test/CommandLine/CommandLineTestResources.Designer.cs
...arp/Test/CommandLine/CommandLineTestResources.Designer.cs
+0
-73
src/Compilers/CSharp/Test/CommandLine/CommandLineTestResources.resx
...ers/CSharp/Test/CommandLine/CommandLineTestResources.resx
+0
-124
src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
+7
-6
src/Compilers/CSharp/Test/CommandLine/ErrorLoggerTests.cs
src/Compilers/CSharp/Test/CommandLine/ErrorLoggerTests.cs
+5
-4
src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
...icrosoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
+4
-11
src/Compilers/CSharp/Test/Emit/Resources.Designer.cs
src/Compilers/CSharp/Test/Emit/Resources.Designer.cs
+2
-2
src/Compilers/CSharp/Test/WinRT/Metadata/WinMdMetadataTests.cs
...ompilers/CSharp/Test/WinRT/Metadata/WinMdMetadataTests.cs
+1
-1
src/Compilers/CSharp/Test/WinRT/PdbTests.cs
src/Compilers/CSharp/Test/WinRT/PdbTests.cs
+1
-1
src/Compilers/Test/Resources/Core/ResourceLoader.cs
src/Compilers/Test/Resources/Core/ResourceLoader.cs
+13
-8
未找到文件。
src/Compilers/CSharp/Test/CommandLine/CommandLineTestResources.Designer.cs
已删除
100644 → 0
浏览文件 @
d8461c09
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests
{
using
System
;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"4.0.0.0"
)]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
internal
class
CommandLineTestResources
{
private
static
global
::
System
.
Resources
.
ResourceManager
resourceMan
;
private
static
global
::
System
.
Globalization
.
CultureInfo
resourceCulture
;
[
global
::
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessageAttribute
(
"Microsoft.Performance"
,
"CA1811:AvoidUncalledPrivateCode"
)]
internal
CommandLineTestResources
()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
internal
static
global
::
System
.
Resources
.
ResourceManager
ResourceManager
{
get
{
if
(
object
.
ReferenceEquals
(
resourceMan
,
null
))
{
global
::
System
.
Resources
.
ResourceManager
temp
=
new
global
::
System
.
Resources
.
ResourceManager
(
"Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.CommandLineTestResources"
,
typeof
(
CommandLineTestResources
).
Assembly
);
resourceMan
=
temp
;
}
return
resourceMan
;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
internal
static
global
::
System
.
Globalization
.
CultureInfo
Culture
{
get
{
return
resourceCulture
;
}
set
{
resourceCulture
=
value
;
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal
static
byte
[]
csc_rsp
{
get
{
object
obj
=
ResourceManager
.
GetObject
(
"csc_rsp"
,
resourceCulture
);
return
((
byte
[])(
obj
));
}
}
}
}
src/Compilers/CSharp/Test/CommandLine/CommandLineTestResources.resx
已删除
100644 → 0
浏览文件 @
d8461c09
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema
id=
"root"
xmlns=
""
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:msdata=
"urn:schemas-microsoft-com:xml-msdata"
>
<xsd:import
namespace=
"http://www.w3.org/XML/1998/namespace"
/>
<xsd:element
name=
"root"
msdata:IsDataSet=
"true"
>
<xsd:complexType>
<xsd:choice
maxOccurs=
"unbounded"
>
<xsd:element
name=
"metadata"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
use=
"required"
type=
"xsd:string"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"assembly"
>
<xsd:complexType>
<xsd:attribute
name=
"alias"
type=
"xsd:string"
/>
<xsd:attribute
name=
"name"
type=
"xsd:string"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"data"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
<xsd:element
name=
"comment"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"2"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
msdata:Ordinal=
"1"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
msdata:Ordinal=
"3"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
msdata:Ordinal=
"4"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"resheader"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader
name=
"resmimetype"
>
<value>
text/microsoft-resx
</value>
</resheader>
<resheader
name=
"version"
>
<value>
2.0
</value>
</resheader>
<resheader
name=
"reader"
>
<value>
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader
name=
"writer"
>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<assembly
alias=
"System.Windows.Forms"
name=
"System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
<data
name=
"csc_rsp"
type=
"System.Resources.ResXFileRef, System.Windows.Forms"
>
<value>
../../csc/csc.rsp;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</data>
</root>
src/Compilers/CSharp/Test/CommandLine/CommandLineTests.cs
浏览文件 @
61cde94a
...
...
@@ -6375,7 +6375,7 @@ private void CheckManifestString(string source, OutputKind outputKind, string ex
}
[
WorkItem
(
544926
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544926"
)]
[
C
lrOnlyFact
]
[
C
onditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30289"
)
]
public
void
ResponseFilesWithNoconfig_01
()
{
string
source
=
Temp
.
CreateFile
(
"a.cs"
).
WriteAllText
(
@"
...
...
@@ -6457,7 +6457,7 @@ public static void Main()
}
[
WorkItem
(
544926
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544926"
)]
[
C
lrOnlyFact
]
[
C
onditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30289"
)
]
public
void
ResponseFilesWithNoconfig_03
()
{
string
source
=
Temp
.
CreateFile
(
"a.cs"
).
WriteAllText
(
@"
...
...
@@ -6554,7 +6554,8 @@ public void NoStdLib()
private
string
GetDefaultResponseFilePath
()
{
return
Temp
.
CreateFile
().
WriteAllBytes
(
CommandLineTestResources
.
csc_rsp
).
Path
;
var
cscRsp
=
global
::
TestResources
.
ResourceLoader
.
GetResourceBlob
(
"csc.rsp"
);
return
Temp
.
CreateFile
().
WriteAllBytes
(
cscRsp
).
Path
;
}
[
Fact
,
WorkItem
(
530359
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530359"
)]
...
...
@@ -8277,7 +8278,7 @@ public void ParseFeatures()
Assert
.
True
(
args
.
ParseOptions
.
Features
.
SetEquals
(
new
Dictionary
<
string
,
string
>
{
{
"Test"
,
"true"
}
}));
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30289"
)
]
public
void
ParseAdditionalFile
()
{
var
args
=
DefaultParse
(
new
[]
{
"/additionalfile:web.config"
,
"a.cs"
},
WorkingDirectory
);
...
...
@@ -9325,7 +9326,7 @@ public void PathMapParser()
Assert
.
Equal
(
KeyValuePairUtil
.
Create
(
"K 2\\"
,
"V 2\\"
),
parsedArgs
.
PathMap
[
1
]);
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30289"
)
]
[
CompilerTrait
(
CompilerFeature
.
Determinism
)]
public
void
PathMapPdbParser
()
{
...
...
@@ -9338,7 +9339,7 @@ public void PathMapPdbParser()
Assert
.
Null
(
parsedArgs
.
EmitOptions
.
PdbFilePath
);
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
ConditionalSkipReason
.
NativePdbRequiresDesktop
)
]
[
CompilerTrait
(
CompilerFeature
.
Determinism
)]
public
void
PathMapPdbEmit
()
{
...
...
src/Compilers/CSharp/Test/CommandLine/ErrorLoggerTests.cs
浏览文件 @
61cde94a
...
...
@@ -8,6 +8,7 @@
using
Microsoft.CodeAnalysis.CSharp.Test.Utilities
;
using
Microsoft.CodeAnalysis.Diagnostics
;
using
Microsoft.CodeAnalysis.Test.Utilities
;
using
Roslyn.Test.Utilities
;
using
Xunit
;
using
static
Microsoft
.
CodeAnalysis
.
CommonDiagnosticAnalyzers
;
...
...
@@ -18,7 +19,7 @@ namespace Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests
{
public
class
ErrorLoggerTests
:
CommandLineTestBase
{
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30289"
)
]
public
void
NoDiagnostics
()
{
var
helloWorldCS
=
@"using System;
...
...
@@ -58,7 +59,7 @@ public static void Main(string[] args)
CleanupAllGeneratedFiles
(
errorLogFile
);
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30289"
)
]
public
void
SimpleCompilerDiagnostics
()
{
var
source
=
@"
...
...
@@ -152,7 +153,7 @@ public class C
CleanupAllGeneratedFiles
(
errorLogFile
);
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30289"
)
]
public
void
SimpleCompilerDiagnostics_Suppressed
()
{
var
source
=
@"
...
...
@@ -252,7 +253,7 @@ public class C
CleanupAllGeneratedFiles
(
errorLogFile
);
}
[
Fact
]
[
ConditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
"https://github.com/dotnet/roslyn/issues/30289"
)
]
public
void
AnalyzerDiagnosticsWithAndWithoutLocation
()
{
var
source
=
@"
...
...
src/Compilers/CSharp/Test/CommandLine/Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests.csproj
浏览文件 @
61cde94a
...
...
@@ -10,6 +10,9 @@
<RoslynProjectType>
UnitTestPortable
</RoslynProjectType>
<GenerateMicrosoftCodeAnalysisCommitHashAttribute>
true
</GenerateMicrosoftCodeAnalysisCommitHashAttribute>
</PropertyGroup>
<ItemGroup>
<Compile
Include=
"..\..\..\Test\Resources\Core\ResourceLoader.cs"
Link=
"ResourceLoader.cs"
/>
</ItemGroup>
<ItemGroup
Label=
"Project References"
>
<ProjectReference
Include=
"..\..\..\..\Test\Utilities\Portable\Roslyn.Test.Utilities.csproj"
/>
<ProjectReference
Include=
"..\..\..\Test\Utilities\CSharp\Microsoft.CodeAnalysis.CSharp.Test.Utilities.csproj"
/>
...
...
@@ -23,19 +26,9 @@
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"
/>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Release|AnyCPU'"
/>
<ItemGroup>
<Compile
Update=
"CommandLineTestResources.Designer.cs"
>
<AutoGen>
True
</AutoGen>
<DesignTime>
True
</DesignTime>
<DependentUpon>
CommandLineTestResources.resx
</DependentUpon>
</Compile>
<EmbeddedResource
Include=
"..\..\csc\csc.rsp"
LogicalName=
"csc.rsp"
/>
</ItemGroup>
<ItemGroup>
<Service
Include=
"{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}"
/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Update=
"CommandLineTestResources.resx"
>
<Generator>
ResXFileCodeGenerator
</Generator>
<LastGenOutput>
CommandLineTestResources.Designer.cs
</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
src/Compilers/CSharp/Test/Emit/Resources.Designer.cs
浏览文件 @
61cde94a
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.
1801
0
// Runtime Version:4.0.30319.
4200
0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
...
...
@@ -19,7 +19,7 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"
4
.0.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"
15
.0.0.0"
)]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
internal
class
Resources
{
...
...
src/Compilers/CSharp/Test/WinRT/Metadata/WinMdMetadataTests.cs
浏览文件 @
61cde94a
...
...
@@ -140,7 +140,7 @@ public void WinMdColorType()
/// Ensure that a simple program that uses projected types can compile
/// and run.
/// </summary>
[
ConditionalFact
(
typeof
(
OSVersionWin8
)
)]
[
ConditionalFact
(
typeof
(
WindowsDesktopOnly
),
ConditionalSkipReason
.
TestExecutionNeedsDesktopTypes
)]
public
void
WinMdColorTest
()
{
var
text
=
@"using Windows.UI;
...
...
src/Compilers/CSharp/Test/WinRT/PdbTests.cs
浏览文件 @
61cde94a
...
...
@@ -74,7 +74,7 @@ public void EmitToBoundedStreams()
r
.
Diagnostics
.
Verify
();
}
[
C
lrOnlyFact
(
ClrOnlyReason
.
Pdb
)]
[
C
onditionalFact
(
typeof
(
WindowsOnly
),
Reason
=
ConditionalSkipReason
.
NativePdbRequiresDesktop
)]
public
void
EmitToStreamWithNonZeroPosition
()
{
var
pdbStream
=
new
MemoryStream
();
...
...
src/Compilers/Test/Resources/Core/ResourceLoader.cs
浏览文件 @
61cde94a
...
...
@@ -22,7 +22,7 @@ private static Stream GetResourceStream(string name)
return
stream
;
}
p
rivate
static
byte
[]
GetResourceBlob
(
string
name
)
p
ublic
static
byte
[]
GetResourceBlob
(
string
name
)
{
using
(
var
stream
=
GetResourceStream
(
name
))
{
...
...
@@ -50,16 +50,21 @@ public static string GetOrCreateResource(ref string resource, string name)
{
if
(
resource
==
null
)
{
using
(
var
stream
=
GetResourceStream
(
name
))
{
using
(
var
streamReader
=
new
StreamReader
(
stream
,
Encoding
.
UTF8
,
detectEncodingFromByteOrderMarks
:
true
))
{
resource
=
streamReader
.
ReadToEnd
();
}
}
resource
=
GetResource
(
name
);
}
return
resource
;
}
public
static
string
GetResource
(
string
name
)
{
using
(
var
stream
=
GetResourceStream
(
name
))
{
using
(
var
streamReader
=
new
StreamReader
(
stream
,
Encoding
.
UTF8
,
detectEncodingFromByteOrderMarks
:
true
))
{
return
streamReader
.
ReadToEnd
();
}
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录