95 references to Parse
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (76)
Semantics\InterceptorsTests.cs (76)
38
private static readonly SyntaxTree s_attributesTree = CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors);
203
var source = CSharpTestSource.
Parse
("""
219
var interceptors = CSharpTestSource.
Parse
($$"""
231
var attributesTree = CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, options: options);
1395
var source = CSharpTestSource.
Parse
("""
2007
var source = CSharpTestSource.
Parse
("""
2024
var interceptors = CSharpTestSource.
Parse
($$"""
2111
var source = CSharpTestSource.
Parse
("""
2140
var interceptors = CSharpTestSource.
Parse
($$"""
2302
var source = CSharpTestSource.
Parse
("""
2327
var interceptors = CSharpTestSource.
Parse
($$"""
3559
var sourceTree = CSharpTestSource.
Parse
("""
3590
var interceptorTree = CSharpTestSource.
Parse
($$"""
3613
var sourceTree = CSharpTestSource.
Parse
("""
3640
var interceptorTree = CSharpTestSource.
Parse
($$"""
6175
var source = CSharpTestSource.
Parse
("""
6192
var interceptors = CSharpTestSource.
Parse
($$"""
6204
comp = CreateCompilation([source, interceptors, s_attributesTree, CSharpTestSource.
Parse
(UnmanagedCallersOnlyAttributeDefinition, "UnmanagedCallersOnlyAttribute.cs", RegularWithInterceptors)]);
7321
var source = CSharpTestSource.
Parse
("""
7338
var interceptors = CSharpTestSource.
Parse
($$"""
7348
var verifier = CompileAndVerify([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)], expectedOutput: "1");
7352
interceptors = CSharpTestSource.
Parse
($$"""
7363
verifier = CompileAndVerify([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)], expectedOutput: "1");
7370
var tree = CSharpTestSource.
Parse
("""
7422
var interceptors = CSharpTestSource.
Parse
($$"""
7433
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7454
var interceptors = CSharpTestSource.
Parse
($$"""
7465
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7478
var interceptors = CSharpTestSource.
Parse
($$"""
7489
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7500
var interceptors = CSharpTestSource.
Parse
($$"""
7511
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7523
var source = CSharpTestSource.
Parse
("""
7540
var interceptors = CSharpTestSource.
Parse
($$"""
7551
var comp1 = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7574
var sourceTree1 = CSharpTestSource.
Parse
(source, path: "Program1.cs", options: RegularWithInterceptors);
7581
var interceptors = CSharpTestSource.
Parse
($$"""
7594
CSharpTestSource.
Parse
(source, path: "Program2.cs", options: RegularWithInterceptors),
7596
CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7608
var source = CSharpTestSource.
Parse
("""
7627
var interceptors = CSharpTestSource.
Parse
($$"""
7637
comp = CreateCompilation([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7649
var source = CSharpTestSource.
Parse
("""
7683
var interceptors = CSharpTestSource.
Parse
($$"""
7694
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7706
var tree = CSharpTestSource.
Parse
("""
7731
var source = CSharpTestSource.
Parse
("""
7749
var interceptors = CSharpTestSource.
Parse
($$"""
7773
var source = CSharpTestSource.
Parse
("""
7795
var interceptors = CSharpTestSource.
Parse
($$"""
7818
var source = CSharpTestSource.
Parse
("""
7836
var interceptors = CSharpTestSource.
Parse
($$"""
7859
var source = CSharpTestSource.
Parse
("""
7877
var interceptors = CSharpTestSource.
Parse
($$"""
7900
var source = CSharpTestSource.
Parse
("""
7921
var interceptors = CSharpTestSource.
Parse
($$"""
7943
var source = CSharpTestSource.
Parse
($$"""
7964
var interceptors = CSharpTestSource.
Parse
($$"""
7993
var source = CSharpTestSource.
Parse
($$"""
8017
var interceptors = CSharpTestSource.
Parse
($$"""
8044
var source = CSharpTestSource.
Parse
("""
8063
var interceptors = CSharpTestSource.
Parse
($$"""
8098
var source = CSharpTestSource.
Parse
("""
8122
var interceptors = CSharpTestSource.
Parse
($$"""
8157
var source = CSharpTestSource.
Parse
("""
8182
var interceptors = CSharpTestSource.
Parse
($$"""
8213
var source = CSharpTestSource.
Parse
("""
8237
var interceptors = CSharpTestSource.
Parse
($$"""
8268
var source = CSharpTestSource.
Parse
("""
8292
var interceptors = CSharpTestSource.
Parse
($$"""
8323
var source = CSharpTestSource.
Parse
("""
8342
var interceptors = CSharpTestSource.
Parse
($$"""
8373
var source = CSharpTestSource.
Parse
("""
8400
var interceptors = CSharpTestSource.
Parse
($$"""
8438
var source = CSharpTestSource.
Parse
("""
8464
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) };