95 references to Parse
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (76)
Semantics\InterceptorsTests.cs (76)
30
private static readonly SyntaxTree s_attributesTree = CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors);
195
var source = CSharpTestSource.
Parse
("""
211
var interceptors = CSharpTestSource.
Parse
($$"""
223
var attributesTree = CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, options: options);
1387
var source = CSharpTestSource.
Parse
("""
1999
var source = CSharpTestSource.
Parse
("""
2016
var interceptors = CSharpTestSource.
Parse
($$"""
2103
var source = CSharpTestSource.
Parse
("""
2132
var interceptors = CSharpTestSource.
Parse
($$"""
2294
var source = CSharpTestSource.
Parse
("""
2319
var interceptors = CSharpTestSource.
Parse
($$"""
3551
var sourceTree = CSharpTestSource.
Parse
("""
3582
var interceptorTree = CSharpTestSource.
Parse
($$"""
3605
var sourceTree = CSharpTestSource.
Parse
("""
3632
var interceptorTree = CSharpTestSource.
Parse
($$"""
6167
var source = CSharpTestSource.
Parse
("""
6184
var interceptors = CSharpTestSource.
Parse
($$"""
6196
comp = CreateCompilation([source, interceptors, s_attributesTree, CSharpTestSource.
Parse
(UnmanagedCallersOnlyAttributeDefinition, "UnmanagedCallersOnlyAttribute.cs", RegularWithInterceptors)]);
7313
var source = CSharpTestSource.
Parse
("""
7330
var interceptors = CSharpTestSource.
Parse
($$"""
7340
var verifier = CompileAndVerify([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)], expectedOutput: "1");
7344
interceptors = CSharpTestSource.
Parse
($$"""
7355
verifier = CompileAndVerify([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)], expectedOutput: "1");
7362
var tree = CSharpTestSource.
Parse
("""
7414
var interceptors = CSharpTestSource.
Parse
($$"""
7425
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7446
var interceptors = CSharpTestSource.
Parse
($$"""
7457
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7470
var interceptors = CSharpTestSource.
Parse
($$"""
7481
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7492
var interceptors = CSharpTestSource.
Parse
($$"""
7503
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7515
var source = CSharpTestSource.
Parse
("""
7532
var interceptors = CSharpTestSource.
Parse
($$"""
7543
var comp1 = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7566
var sourceTree1 = CSharpTestSource.
Parse
(source, path: "Program1.cs", options: RegularWithInterceptors);
7573
var interceptors = CSharpTestSource.
Parse
($$"""
7586
CSharpTestSource.
Parse
(source, path: "Program2.cs", options: RegularWithInterceptors),
7588
CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7600
var source = CSharpTestSource.
Parse
("""
7619
var interceptors = CSharpTestSource.
Parse
($$"""
7629
comp = CreateCompilation([source, interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7641
var source = CSharpTestSource.
Parse
("""
7675
var interceptors = CSharpTestSource.
Parse
($$"""
7686
var comp = CreateCompilation([interceptors, CSharpTestSource.
Parse
(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)]);
7698
var tree = CSharpTestSource.
Parse
("""
7723
var source = CSharpTestSource.
Parse
("""
7741
var interceptors = CSharpTestSource.
Parse
($$"""
7765
var source = CSharpTestSource.
Parse
("""
7787
var interceptors = CSharpTestSource.
Parse
($$"""
7810
var source = CSharpTestSource.
Parse
("""
7828
var interceptors = CSharpTestSource.
Parse
($$"""
7851
var source = CSharpTestSource.
Parse
("""
7869
var interceptors = CSharpTestSource.
Parse
($$"""
7892
var source = CSharpTestSource.
Parse
("""
7913
var interceptors = CSharpTestSource.
Parse
($$"""
7935
var source = CSharpTestSource.
Parse
($$"""
7956
var interceptors = CSharpTestSource.
Parse
($$"""
7985
var source = CSharpTestSource.
Parse
($$"""
8009
var interceptors = CSharpTestSource.
Parse
($$"""
8036
var source = CSharpTestSource.
Parse
("""
8055
var interceptors = CSharpTestSource.
Parse
($$"""
8090
var source = CSharpTestSource.
Parse
("""
8114
var interceptors = CSharpTestSource.
Parse
($$"""
8149
var source = CSharpTestSource.
Parse
("""
8174
var interceptors = CSharpTestSource.
Parse
($$"""
8205
var source = CSharpTestSource.
Parse
("""
8229
var interceptors = CSharpTestSource.
Parse
($$"""
8260
var source = CSharpTestSource.
Parse
("""
8284
var interceptors = CSharpTestSource.
Parse
($$"""
8315
var source = CSharpTestSource.
Parse
("""
8334
var interceptors = CSharpTestSource.
Parse
($$"""
8365
var source = CSharpTestSource.
Parse
("""
8392
var interceptors = CSharpTestSource.
Parse
($$"""
8430
var source = CSharpTestSource.
Parse
("""
8456
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)
1638
=> 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)
65
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) };