95 references to Parse
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (76)
Semantics\InterceptorsTests.cs (76)
39
private static readonly SyntaxTree s_attributesTree = CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors);
204
var source = CSharpTestSource.
Parse
("""
220
var interceptors = CSharpTestSource.
Parse
($$"""
232
var attributesTree = CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, options: options);
1396
var source = CSharpTestSource.
Parse
("""
2008
var source = CSharpTestSource.
Parse
("""
2025
var interceptors = CSharpTestSource.
Parse
($$"""
2112
var source = CSharpTestSource.
Parse
("""
2141
var interceptors = CSharpTestSource.
Parse
($$"""
2303
var source = CSharpTestSource.
Parse
("""
2328
var interceptors = CSharpTestSource.
Parse
($$"""
3560
var sourceTree = CSharpTestSource.
Parse
("""
3591
var interceptorTree = CSharpTestSource.
Parse
($$"""
3614
var sourceTree = CSharpTestSource.
Parse
("""
3641
var interceptorTree = CSharpTestSource.
Parse
($$"""
6176
var source = CSharpTestSource.
Parse
("""
6193
var interceptors = CSharpTestSource.
Parse
($$"""
6205
comp = CreateCompilation([source, interceptors, s_attributesTree, CSharpTestSource.
Parse
(UnmanagedCallersOnlyAttributeDefinition, "UnmanagedCallersOnlyAttribute.cs", RegularWithInterceptors)]);
7322
var source = CSharpTestSource.
Parse
("""
7339
var interceptors = CSharpTestSource.
Parse
($$"""
7349
var verifier = CompileAndVerify([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)], expectedOutput: "1");
7353
interceptors = CSharpTestSource.
Parse
($$"""
7364
verifier = CompileAndVerify([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)], expectedOutput: "1");
7371
var tree = CSharpTestSource.
Parse
("""
7423
var interceptors = CSharpTestSource.
Parse
($$"""
7434
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7455
var interceptors = CSharpTestSource.
Parse
($$"""
7466
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7479
var interceptors = CSharpTestSource.
Parse
($$"""
7490
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7501
var interceptors = CSharpTestSource.
Parse
($$"""
7512
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7524
var source = CSharpTestSource.
Parse
("""
7541
var interceptors = CSharpTestSource.
Parse
($$"""
7552
var comp1 = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7575
var sourceTree1 = CSharpTestSource.
Parse
(source, path: "Program1.cs", options: RegularWithInterceptors);
7582
var interceptors = CSharpTestSource.
Parse
($$"""
7595
CSharpTestSource.
Parse
(source, path: "Program2.cs", options: RegularWithInterceptors),
7597
CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7609
var source = CSharpTestSource.
Parse
("""
7628
var interceptors = CSharpTestSource.
Parse
($$"""
7638
comp = CreateCompilation([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7650
var source = CSharpTestSource.
Parse
("""
7684
var interceptors = CSharpTestSource.
Parse
($$"""
7695
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7707
var tree = CSharpTestSource.
Parse
("""
7732
var source = CSharpTestSource.
Parse
("""
7750
var interceptors = CSharpTestSource.
Parse
($$"""
7774
var source = CSharpTestSource.
Parse
("""
7796
var interceptors = CSharpTestSource.
Parse
($$"""
7819
var source = CSharpTestSource.
Parse
("""
7837
var interceptors = CSharpTestSource.
Parse
($$"""
7860
var source = CSharpTestSource.
Parse
("""
7878
var interceptors = CSharpTestSource.
Parse
($$"""
7901
var source = CSharpTestSource.
Parse
("""
7922
var interceptors = CSharpTestSource.
Parse
($$"""
7944
var source = CSharpTestSource.
Parse
($$"""
7965
var interceptors = CSharpTestSource.
Parse
($$"""
7994
var source = CSharpTestSource.
Parse
($$"""
8018
var interceptors = CSharpTestSource.
Parse
($$"""
8045
var source = CSharpTestSource.
Parse
("""
8064
var interceptors = CSharpTestSource.
Parse
($$"""
8099
var source = CSharpTestSource.
Parse
("""
8123
var interceptors = CSharpTestSource.
Parse
($$"""
8158
var source = CSharpTestSource.
Parse
("""
8183
var interceptors = CSharpTestSource.
Parse
($$"""
8214
var source = CSharpTestSource.
Parse
("""
8238
var interceptors = CSharpTestSource.
Parse
($$"""
8269
var source = CSharpTestSource.
Parse
("""
8293
var interceptors = CSharpTestSource.
Parse
($$"""
8324
var source = CSharpTestSource.
Parse
("""
8343
var interceptors = CSharpTestSource.
Parse
($$"""
8374
var source = CSharpTestSource.
Parse
("""
8401
var interceptors = CSharpTestSource.
Parse
($$"""
8439
var source = CSharpTestSource.
Parse
("""
8465
var interceptors = CSharpTestSource.
Parse
($$"""
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Source\FileModifierTests.cs (2)
832
var testSource1 = CSharpTestSource.
Parse
(source, Path.Combine(root1, "code.cs"));
833
var testSource2 = CSharpTestSource.
Parse
(source, Path.Combine(root2, "code.cs"));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
CSharpTestBase.cs (1)
1550
=> CSharpTestSource.
Parse
(text, filename, options, encoding, checksumAlgorithm);
CSharpTestSource.cs (2)
51
return new[] {
Parse
(source, path: sourceFileName, parseOptions) };
60
return sources.Select(source =>
Parse
(source.Source, source.FileName, parseOptions)).ToArray();
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueMethodDebugInfoReaderTests.cs (1)
63
var tree = CSharpTestSource.
Parse
(source, path: "/a/c.cs", options: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), checksumAlgorithm: SourceHashAlgorithm.Sha1);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CSharpDeterministicKeyBuilderTests.cs (1)
77
CSharpTestSource.
Parse
(@"System.Console.WriteLine(""Hello World"");", checksumAlgorithm: SourceHashAlgorithm.Sha1),
Microsoft.CodeAnalysis.UnitTests (9)
Analyzers\AnalyzerFileReferenceTests.cs (1)
485
new[] { CSharpTestSource.
Parse
(generatorSource) },
Diagnostics\OperationTests.cs (1)
274
var tree = CSharpTestSource.
Parse
(source);
Diagnostics\SuppressMessageAttributeCompilerTests.cs (2)
60
syntaxTrees: new[] { CSharpTestSource.
Parse
(unconditionalSuppressMessageDef) },
74
CSharpTestSource.
Parse
(source, path: fileName) :
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1456
CSharpTestSource.
Parse
(source, path: fileName) :
GivesAccessTo.cs (2)
22
var csharpTree = CSharpTestSource.
Parse
(@"
29
var csharpTree2 = CSharpTestSource.
Parse
(@"
IsSymbolAccessibleWithinTests.cs (1)
23
var csharpTree = CSharpTestSource.
Parse
("class A { }");
MetadataReferences\MetadataReferenceTests.cs (1)
572
syntaxTrees: new[] { CSharpTestSource.
Parse
("class C : System.Collections.ArrayList { }") },
VBCSCompiler.UnitTests (3)
AnalyzerConsistencyCheckerTests.cs (3)
55
? new[] { CSharpTestSource.
Parse
(source) }
56
: new[] { CSharpTestSource.
Parse
(source), CSharpTestSource.
Parse
(extraSource) };