Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
298d0529
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,发现更多精彩内容 >>
提交
298d0529
编写于
11月 20, 2015
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't block during tests.
上级
a87a30dd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
67 addition
and
65 deletion
+67
-65
src/Workspaces/CoreTest/CodeCleanup/CodeCleanupTests.cs
src/Workspaces/CoreTest/CodeCleanup/CodeCleanupTests.cs
+16
-15
src/Workspaces/CoreTest/CodeCleanup/FixIncorrectTokenTests.cs
...Workspaces/CoreTest/CodeCleanup/FixIncorrectTokenTests.cs
+51
-50
未找到文件。
src/Workspaces/CoreTest/CodeCleanup/CodeCleanupTests.cs
浏览文件 @
298d0529
...
...
@@ -38,37 +38,38 @@ public void DefaultVisualBasicCodeCleanups()
#endif
[
Fact
]
public
void
CodeCleaners_NoSpans
()
public
async
Task
CodeCleaners_NoSpans
()
{
var
document
=
CreateDocument
(
"class C { }"
,
LanguageNames
.
CSharp
);
var
cleanDocument
=
CodeCleaner
.
CleanupAsync
(
document
,
SpecializedCollections
.
EmptyEnumerable
<
TextSpan
>()).
Result
;
var
cleanDocument
=
await
CodeCleaner
.
CleanupAsync
(
document
,
SpecializedCollections
.
EmptyEnumerable
<
TextSpan
>())
;
Assert
.
Equal
(
document
,
cleanDocument
);
}
[
Fact
]
public
void
CodeCleaners_Document
()
public
async
Task
CodeCleaners_Document
()
{
var
document
=
CreateDocument
(
"class C { }"
,
LanguageNames
.
CSharp
);
var
cleanDocument
=
CodeCleaner
.
CleanupAsync
(
document
).
Result
;
var
cleanDocument
=
await
CodeCleaner
.
CleanupAsync
(
document
)
;
Assert
.
Equal
(
document
,
cleanDocument
);
}
[
Fact
]
public
void
CodeCleaners_Span
()
public
async
Task
CodeCleaners_Span
()
{
var
document
=
CreateDocument
(
"class C { }"
,
LanguageNames
.
CSharp
);
var
cleanDocument
=
CodeCleaner
.
CleanupAsync
(
document
,
document
.
GetSyntaxRootAsync
().
Result
.
FullSpan
).
Result
;
var
cleanDocument
=
await
CodeCleaner
.
CleanupAsync
(
document
,
(
await
document
.
GetSyntaxRootAsync
()).
FullSpan
)
;
Assert
.
Equal
(
document
,
cleanDocument
);
}
[
Fact
]
public
void
CodeCleaners_Spans
()
public
async
Task
CodeCleaners_Spans
()
{
var
document
=
CreateDocument
(
"class C { }"
,
LanguageNames
.
CSharp
);
var
cleanDocument
=
CodeCleaner
.
CleanupAsync
(
document
,
SpecializedCollections
.
SingletonEnumerable
(
document
.
GetSyntaxRootAsync
().
Result
.
FullSpan
)).
Result
;
var
cleanDocument
=
await
CodeCleaner
.
CleanupAsync
(
document
,
SpecializedCollections
.
SingletonEnumerable
(
(
await
document
.
GetSyntaxRootAsync
()).
FullSpan
));
Assert
.
Equal
(
document
,
cleanDocument
);
}
...
...
@@ -218,7 +219,7 @@ Imports System.Diagnostics
[
Fact
]
[
WorkItem
(
774295
,
"DevDiv"
)]
public
void
DontCrash_VB_2
()
public
async
Task
DontCrash_VB_2
()
{
var
code
=
@"
Public Class Class1
...
...
@@ -234,22 +235,22 @@ End Event
End Class
"
;
var
document
=
CreateDocument
(
code
,
LanguageNames
.
VisualBasic
);
var
semanticModel
=
document
.
GetSemanticModelAsync
().
Result
;
var
root
=
document
.
GetSyntaxRootAsync
().
Result
;
var
semanticModel
=
await
document
.
GetSemanticModelAsync
()
;
var
root
=
await
document
.
GetSyntaxRootAsync
()
;
var
accessor
=
root
.
DescendantNodes
().
OfType
<
VisualBasic
.
Syntax
.
AccessorBlockSyntax
>().
Last
();
var
factory
=
new
SemanticModelWorkspaceServiceFactory
();
var
service
=
(
ISemanticModelService
)
factory
.
CreateService
(
document
.
Project
.
Solution
.
Workspace
.
Services
);
var
newSemanticModel
=
service
.
GetSemanticModelForNodeAsync
(
document
,
accessor
,
CancellationToken
.
None
).
Result
;
var
newSemanticModel
=
await
service
.
GetSemanticModelForNodeAsync
(
document
,
accessor
,
CancellationToken
.
None
)
;
Assert
.
NotNull
(
newSemanticModel
);
var
newDocument
=
CreateDocument
(
code
,
LanguageNames
.
VisualBasic
);
var
newRoot
=
newDocument
.
GetSyntaxRootAsync
().
Result
;
var
newRoot
=
await
newDocument
.
GetSyntaxRootAsync
()
;
var
newAccessor
=
newRoot
.
DescendantNodes
().
OfType
<
VisualBasic
.
Syntax
.
AccessorBlockSyntax
>().
Last
();
root
=
root
.
ReplaceNode
(
accessor
,
newAccessor
);
document
=
document
.
WithSyntaxRoot
(
root
);
accessor
=
root
.
DescendantNodes
().
OfType
<
VisualBasic
.
Syntax
.
AccessorBlockSyntax
>().
Last
();
newSemanticModel
=
service
.
GetSemanticModelForNodeAsync
(
document
,
accessor
,
CancellationToken
.
None
).
Result
;
newSemanticModel
=
await
service
.
GetSemanticModelForNodeAsync
(
document
,
accessor
,
CancellationToken
.
None
)
;
Assert
.
NotNull
(
newSemanticModel
);
var
cleanDocument
=
CodeCleaner
.
CleanupAsync
(
document
).
Result
;
var
cleanDocument
=
await
CodeCleaner
.
CleanupAsync
(
document
)
;
Assert
.
Equal
(
document
,
cleanDocument
);
}
...
...
src/Workspaces/CoreTest/CodeCleanup/FixIncorrectTokenTests.cs
浏览文件 @
298d0529
...
...
@@ -4,6 +4,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis
;
using
Microsoft.CodeAnalysis.CodeCleanup
;
using
Microsoft.CodeAnalysis.CodeCleanup.Providers
;
...
...
@@ -19,7 +20,7 @@ public class FixIncorrectTokensTests
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithMatchingIf
()
public
async
Task
FixEndIfKeyword_WithMatchingIf
()
{
var
code
=
@"
Module Program
...
...
@@ -38,13 +39,13 @@ Sub Main(args As String())
End If
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithMatchingIf_Directive
()
public
async
Task
FixEndIfKeyword_WithMatchingIf_Directive
()
{
var
code
=
@"[|
#If c = 0 Then
...
...
@@ -53,13 +54,13 @@ public void FixEndIfKeyword_WithMatchingIf_Directive()
var
expected
=
@"
#If c = 0 Then
#End If"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithoutMatchingIf
()
public
async
Task
FixEndIfKeyword_WithoutMatchingIf
()
{
var
code
=
@"
Module Program
...
...
@@ -74,13 +75,13 @@ Sub Main(args As String())
End If
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithoutMatchingIf_Directive
()
public
async
Task
FixEndIfKeyword_WithoutMatchingIf_Directive
()
{
var
code
=
@"[|
Class X
...
...
@@ -93,13 +94,13 @@ Class X
End Class
#End If"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
(
Skip
=
"889521"
)]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_SameLineAsIf
()
public
async
Task
FixEndIfKeyword_SameLineAsIf
()
{
var
code
=
@"
Module Program
...
...
@@ -115,13 +116,13 @@ Sub Main(args As String())
End If
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_SameLineAsIf_Invalid
()
public
async
Task
FixEndIfKeyword_SameLineAsIf_Invalid
()
{
var
code
=
@"
Module Program
...
...
@@ -136,26 +137,26 @@ Sub Main(args As String())
If args IsNot Nothing EndIf
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_SameLineAsIf_Directive
()
public
async
Task
FixEndIfKeyword_SameLineAsIf_Directive
()
{
var
code
=
@"[|
#If c = 0 Then #Endif|]"
;
var
expected
=
@"
#If c = 0 Then #Endif"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithLeadingTrivia
()
public
async
Task
FixEndIfKeyword_WithLeadingTrivia
()
{
var
code
=
@"
Module Program
...
...
@@ -176,13 +177,13 @@ Sub Main(args As String())
End If
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithLeadingTrivia_Directive
()
public
async
Task
FixEndIfKeyword_WithLeadingTrivia_Directive
()
{
var
code
=
@"[|
#If c = 0 Then
...
...
@@ -195,13 +196,13 @@ public void FixEndIfKeyword_WithLeadingTrivia_Directive()
'#Endif
#End If
"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_InvocationExpressionArgument
()
public
async
Task
FixEndIfKeyword_InvocationExpressionArgument
()
{
var
code
=
@"
Module Program
...
...
@@ -220,13 +221,13 @@ Sub Main(args As String())
InvocationExpression EndIf
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_InvalidDirectiveCases
()
public
async
Task
FixEndIfKeyword_InvalidDirectiveCases
()
{
var
code
=
@"[|
' BadDirective cases
...
...
@@ -279,13 +280,13 @@ public void FixEndIfKeyword_InvalidDirectiveCases()
InvocationExpression
#End If
"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithTrailingTrivia
()
public
async
Task
FixEndIfKeyword_WithTrailingTrivia
()
{
var
code
=
@"
Module Program
...
...
@@ -304,13 +305,13 @@ Sub Main(args As String())
End If ' Dummy EndIf
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithTrailingTrivia_Directive
()
public
async
Task
FixEndIfKeyword_WithTrailingTrivia_Directive
()
{
var
code
=
@"[|
#If c = 0 Then
...
...
@@ -321,13 +322,13 @@ public void FixEndIfKeyword_WithTrailingTrivia_Directive()
#If c = 0 Then
#End If '#Endif
"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithIdentifierTokenTrailingTrivia
()
public
async
Task
FixEndIfKeyword_WithIdentifierTokenTrailingTrivia
()
{
var
code
=
@"
Module Program
...
...
@@ -346,13 +347,13 @@ Sub Main(args As String())
End If IdentifierToken
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_InvalidDirectiveCases_02
()
public
async
Task
FixEndIfKeyword_InvalidDirectiveCases_02
()
{
var
code
=
@"[|
' BadDirective cases
...
...
@@ -405,13 +406,13 @@ public void FixEndIfKeyword_InvalidDirectiveCases_02()
#End If
IdentifierToken
"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithLeadingAndTrailingTrivia
()
public
async
Task
FixEndIfKeyword_WithLeadingAndTrailingTrivia
()
{
var
code
=
@"
Module Program
...
...
@@ -434,13 +435,13 @@ End If
' Dummy EndIf
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithLeadingAndTrailingTrivia_Directive
()
public
async
Task
FixEndIfKeyword_WithLeadingAndTrailingTrivia_Directive
()
{
var
code
=
@"[|
#If c = 0 Then
...
...
@@ -453,13 +454,13 @@ public void FixEndIfKeyword_WithLeadingAndTrailingTrivia_Directive()
'#Endif
#End If '#Endif
"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithLeadingAndTrailingInvocationExpressions
()
public
async
Task
FixEndIfKeyword_WithLeadingAndTrailingInvocationExpressions
()
{
var
code
=
@"
Module Program
...
...
@@ -482,13 +483,13 @@ End If
IdentifierToken
End Sub
End Module"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
17313
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixEndIfKeyword_WithLeadingAndTrailingInvocationExpressions_Directive
()
public
async
Task
FixEndIfKeyword_WithLeadingAndTrailingInvocationExpressions_Directive
()
{
var
code
=
@"[|
' BadDirective cases
...
...
@@ -541,13 +542,13 @@ public void FixEndIfKeyword_WithLeadingAndTrailingInvocationExpressions_Directiv
InvalidTrivia#
#End If InvalidTrivia#
"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
5722
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixPrimitiveTypeKeywords_ValidCases
()
public
async
Task
FixPrimitiveTypeKeywords_ValidCases
()
{
var
code
=
@"[|
Imports SystemAlias = System
...
...
@@ -634,13 +635,13 @@ Sub Main(args As String())
End Sub
End Module
"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
5722
,
"DevDiv_Projects/Roslyn"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixPrimitiveTypeKeywords_InvalidCases
()
public
async
Task
FixPrimitiveTypeKeywords_InvalidCases
()
{
// With a user defined type named System
// No fixups as System binds to type not a namespace.
...
...
@@ -704,7 +705,7 @@ End Sub
End Module
"
;
Verify
(
@"[|"
+
code
+
@"|]"
,
expectedResult
:
code
);
await
VerifyAsync
(
@"[|"
+
code
+
@"|]"
,
expectedResult
:
code
);
// No Fixes in trivia
code
=
@"
...
...
@@ -719,13 +720,13 @@ End Sub
End Module
"
;
Verify
(
@"[|"
+
code
+
@"|]"
,
expectedResult
:
code
);
await
VerifyAsync
(
@"[|"
+
code
+
@"|]"
,
expectedResult
:
code
);
}
[
Fact
]
[
WorkItem
(
606015
,
"DevDiv"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixFullWidthSingleQuotes
()
public
async
Task
FixFullWidthSingleQuotes
()
{
var
code
=
@"[|
‘fullwidth 1
...
...
@@ -746,13 +747,13 @@ public void FixFullWidthSingleQuotes()
'’fullwidth 6
'’‘’fullwidth 7
'‘’‘’fullwidth 8"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
[
Fact
]
[
WorkItem
(
707135
,
"DevDiv"
)]
[
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FixIncorrectTokens
)]
public
void
FixFullWidthSingleQuotes2
()
public
async
Task
FixFullWidthSingleQuotes2
()
{
var
savedCulture
=
System
.
Threading
.
Thread
.
CurrentThread
.
CurrentCulture
;
...
...
@@ -764,7 +765,7 @@ public void FixFullWidthSingleQuotes2()
var
code
=
@"[|‘’fullwidth 1|]"
;
var
expected
=
@"'’fullwidth 1"
;
Verify
(
code
,
expected
);
await
VerifyAsync
(
code
,
expected
);
}
finally
{
...
...
@@ -777,7 +778,7 @@ private static string FixLineEndings(string text)
return
text
.
Replace
(
"\r\n"
,
"\n"
).
Replace
(
"\n"
,
"\r\n"
);
}
private
static
void
Verify
(
string
codeWithMarker
,
string
expectedResult
)
private
static
async
Task
VerifyAsync
(
string
codeWithMarker
,
string
expectedResult
)
{
codeWithMarker
=
FixLineEndings
(
codeWithMarker
);
expectedResult
=
FixLineEndings
(
expectedResult
);
...
...
@@ -789,9 +790,9 @@ private static void Verify(string codeWithMarker, string expectedResult)
var
document
=
CreateDocument
(
codeWithoutMarker
,
LanguageNames
.
VisualBasic
);
var
codeCleanups
=
CodeCleaner
.
GetDefaultProviders
(
document
).
Where
(
p
=>
p
.
Name
==
PredefinedCodeCleanupProviderNames
.
FixIncorrectTokens
||
p
.
Name
==
PredefinedCodeCleanupProviderNames
.
Format
);
var
cleanDocument
=
CodeCleaner
.
CleanupAsync
(
document
,
textSpans
[
0
],
codeCleanups
).
Result
;
var
cleanDocument
=
await
CodeCleaner
.
CleanupAsync
(
document
,
textSpans
[
0
],
codeCleanups
)
;
Assert
.
Equal
(
expectedResult
,
cleanDocument
.
GetSyntaxRootAsync
().
Result
.
ToFullString
());
Assert
.
Equal
(
expectedResult
,
(
await
cleanDocument
.
GetSyntaxRootAsync
())
.
ToFullString
());
}
private
static
Document
CreateDocument
(
string
code
,
string
language
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录