663 references to Parse
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (134)
BreakingChanges.cs (2)
197
var tree =
Parse
(text, options: TestOptions.RegularWithDocumentationComments);
216
var tree =
Parse
(text, options: TestOptions.RegularWithDocumentationComments);
CodeGen\CodeGenAsyncIteratorTests.cs (2)
135
=> CreateCompilationWithTasksExtensions(new[] { (CSharpTestSource)CSharpTestBase.
Parse
(source, filename: "source", parseOptions), CSharpTestBase.
Parse
(AsyncStreamsTypes, filename: "AsyncStreamsTypes", parseOptions) },
CodeGen\CodeGenAsyncTests.cs (1)
4987
var compilation = CreateEmptyCompilation(new[] {
Parse
(source) });
CodeGen\CodeGenDynamicTests.cs (2)
7465
new[] {
Parse
(sourceScript, options: TestOptions.Script) },
7562
new[] {
Parse
(sourceScript, options: TestOptions.Script) },
CodeGen\CodeGenExprLambdaTests.cs (4)
838
CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(source),
Parse
(ExpressionTestLibrary) }).VerifyDiagnostics(
862
CreateCompilationWithMscorlib46(new[] {
Parse
(source),
Parse
(ExpressionTestLibrary) }, new[] { ExpressionAssemblyRef }).VerifyDiagnostics(
CodeGen\CodeGenIterators.cs (6)
1938
var parsed = new[] {
Parse
(source) };
1970
var parsed = new[] {
Parse
(source) };
2390
var compilation = CreateEmptyCompilation(new[] {
Parse
(source, options: parseOptions),
Parse
(corlib, options: parseOptions) });
2435
var compilation = CreateEmptyCompilation(new[] {
Parse
(source, options: TestOptions.Regular.WithNoRefSafetyRulesAttribute()) });
2499
var compilation = CreateEmptyCompilation(new[] {
Parse
(source, options: TestOptions.Regular.WithNoRefSafetyRulesAttribute()) });
CodeGen\CodeGenTests.cs (1)
475
var tree =
Parse
(source);
CodeGen\CodeGenTupleTest.cs (40)
1600
var tree =
Parse
(source, options: TestOptions.Regular);
5464
var tree =
Parse
(source);
8293
var tree =
Parse
(source, options: TestOptions.Regular);
8324
var tree =
Parse
(source, options: TestOptions.Regular);
8379
var tree =
Parse
(source, options: TestOptions.Regular);
8408
var tree =
Parse
(source, options: TestOptions.Regular);
8437
var tree =
Parse
(source, options: TestOptions.Regular);
8485
var tree =
Parse
(source, options: TestOptions.Regular);
8519
var tree =
Parse
(source, options: TestOptions.Regular);
8552
var tree =
Parse
(source, options: TestOptions.Regular);
8581
var tree =
Parse
(source, options: TestOptions.Regular);
8628
var tree =
Parse
(source, options: TestOptions.Regular);
8663
var tree =
Parse
(source, options: TestOptions.Regular);
8692
var tree =
Parse
(source, options: TestOptions.Regular);
8721
var tree =
Parse
(source, options: TestOptions.Regular);
8751
var tree =
Parse
(source, options: TestOptions.Regular);
8806
var tree =
Parse
(source, options: TestOptions.Regular);
8836
var tree =
Parse
(source, options: TestOptions.Regular);
8895
var tree =
Parse
(source, options: TestOptions.Regular);
8942
var tree =
Parse
(source, options: TestOptions.Regular);
9013
var tree =
Parse
(source, options: TestOptions.Regular);
9065
var tree =
Parse
(source, options: TestOptions.Regular);
9142
var tree =
Parse
(source, options: TestOptions.Regular);
9223
var tree =
Parse
(source, options: TestOptions.Regular);
9306
var tree =
Parse
(source, options: TestOptions.Regular);
9360
var tree =
Parse
(source, options: TestOptions.Regular);
16568
var tree =
Parse
(source, options: TestOptions.Regular);
16605
var tree =
Parse
(source, options: TestOptions.Regular);
17211
var tree =
Parse
(source, options: TestOptions.Regular);
17272
var tree =
Parse
(source, options: TestOptions.Regular);
17331
var tree =
Parse
(source, options: TestOptions.Regular);
17370
var tree =
Parse
(source, options: TestOptions.Regular);
17402
var tree =
Parse
(source, options: TestOptions.Regular7_1);
17435
var tree =
Parse
(source, options: TestOptions.Regular7_1);
19064
var tree =
Parse
(text);
19103
var tree =
Parse
(text);
19142
var tree =
Parse
(text);
19181
var tree =
Parse
(text);
25354
var corlibWithoutVT = CreateEmptyCompilation(new[] {
Parse
(String.Format(versionTemplate, "1") + corlib_cs, options: parseOptions) }, assemblyName: "corlib");
25358
var corlibWithVT = CreateEmptyCompilation(new[] {
Parse
(String.Format(versionTemplate, "2") + corlib_cs + valuetuple_cs, options: parseOptions) }, assemblyName: "corlib");
CodeGen\GotoTest.cs (2)
1037
var tree =
Parse
(source, options: TestOptions.Script);
1050
var tree =
Parse
(source, options: TestOptions.Script);
CodeGen\SwitchTests.cs (1)
4513
source: new[] {
Parse
(text) },
Emit\CompilationEmitTests.cs (6)
1205
CSharpCompilation comp1 = CreateCompilation(
Parse
(source1), options: TestOptions.DebugDll.WithDeterministic(true), assemblyName: name);
1209
Compilation comp2 = CreateCompilation(
Parse
(source2), options: TestOptions.DebugDll.WithDeterministic(true), assemblyName: name);
1280
var source =
Parse
("");
1293
var source =
Parse
("");
2095
CSharpCompilation comp = CreateCompilation(
Parse
(source),
3464
new[] {
Parse
(source) },
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (13)
75
var c = CreateCompilation(
Parse
(ExampleSource + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
219
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
339
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
433
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
490
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
529
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
560
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
600
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
668
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
749
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
830
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
924
var c = CreateCompilation(
Parse
(source + InstrumentationHelperSource, @"C:\myproject\doc1.cs"), references: new[] { RefSafetyRulesAttributeLib });
957
var c = CreateCompilation(
Parse
(ExampleSource + InstrumentationHelperSource, @"C:\myproject\doc1.cs"));
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (1)
3586
trees.Add(
Parse
(source.Content, filename: source.Path));
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (4)
46
var compilation0 = CreateCompilation(
Parse
(source0, "a.cs", parseOptions), options: TestOptions.DebugDll);
47
var compilation1 = compilation0.WithSource(
Parse
(source1, "a.cs", parseOptions));
3307
var asyncStreamsTree =
Parse
(AsyncStreamsTypes, options: (CSharpParseOptions)source0.Tree.Options);
5815
var asyncStreamsTree =
Parse
(AsyncStreamsTypes, options: (CSharpParseOptions)source0.Tree.Options);
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
44
parser: s =>
Parse
(s, fileName, options ?? TestOptions.Regular.WithNoRefSafetyRulesAttribute()),
Emit\EditAndContinue\EditAndContinueTests.cs (2)
6340
var compilation0 = CreateCompilation(
Parse
(source0, "a.cs", parseOptions), options: TestOptions.DebugDll);
6341
var compilation1 = compilation0.RemoveAllSyntaxTrees().AddSyntaxTrees(
Parse
(source1, "a.cs", parseOptions));
Emit\EditAndContinue\LocalSlotMappingTests.cs (2)
751
var asyncStreamsTree =
Parse
(AsyncStreamsTypes, options: (CSharpParseOptions)source0.Tree.Options);
844
var asyncStreamsTree =
Parse
(AsyncStreamsTypes, options: (CSharpParseOptions)source0.Tree.Options);
Emit\EntryPointTests.cs (2)
283
Parse
(csx, options: TestOptions.Script),
284
Parse
(cs, options: TestOptions.Regular)
PDB\CheckSumTest.cs (4)
24
new[] {
Parse
(source, filePath) },
233
var compilation = CreateCompilation(new[] {
Parse
(text1, "a.cs"),
Parse
(text2, "b.cs") });
297
new[] {
Parse
(@"
PDB\CSharpDeterministicBuildCompilationTests.cs (9)
99
var sourceOne =
Parse
(@"
111
var sourceTwo =
Parse
(@"
116
var sourceThree =
Parse
(@"
159
var sourceOne =
Parse
(@"
171
var sourceTwo =
Parse
(@"
176
var sourceThree =
Parse
(@"
223
var sourceOne =
Parse
(@"
235
var sourceTwo =
Parse
(@"
240
var sourceThree =
Parse
(@"
PDB\PDBEmbeddedSourceTests.cs (3)
42
var tree1 =
Parse
(source1, "f:/build/goo.cs");
43
var tree2 =
Parse
(source2, "f:/build/nocode.cs");
103
var tree =
Parse
(source, "f:/build/goo.cs");
PDB\PDBSourceLinkTests.cs (5)
51
var c = CreateCompilation(
Parse
(source, "f:/build/goo.cs"), options: TestOptions.DebugDll);
81
var c = CreateCompilation(
Parse
(source, "f:/build/goo.cs"), options: TestOptions.DebugDll);
121
var c = CreateCompilation(
Parse
(source, "f:/build/goo.cs"), options: TestOptions.DebugDll);
143
var c = CreateCompilation(
Parse
(source, "f:/build/goo.cs"), options: TestOptions.DebugDll);
185
var c = CreateCompilation(
Parse
(source, "f:/build/goo.cs"), options: TestOptions.DebugDll);
PDB\PDBTests.cs (16)
166
new[] {
Parse
(text1, @"C:\Folder1\Folder2\Test1.cs") },
210
new[] {
Parse
(text1, @"/Folder1/Folder2/Test1.cs") },
520
var tree1 =
Parse
(source1, @"foo.cs");
521
var tree2 =
Parse
(source2, @"foo.cs");
4878
var compilation = CreateCompilation(new SyntaxTree[] {
Parse
(text1, "a.cs"),
Parse
(text2, "b.cs") });
4974
var compilation = CreateCompilation(new[] {
Parse
(text1, "a.cs"),
Parse
(text2, "b.cs"),
Parse
(text3, "a.cs") }, options: TestOptions.DebugDll);
7944
var c = CreateCompilation(
Parse
(source, filename: "file.cs"));
12386
new[] {
Parse
(initializerSource, "initializer.cs"),
Parse
(constructorSource, "constructor.cs") },
12892
var tree1 =
Parse
(source1, "f:/build/goo.cs");
12893
var tree2 =
Parse
(source2, "f:/build/nocode.cs");
12931
var tree =
Parse
(source, "f:/build/nocode.cs");
12954
new[] {
Parse
(source, "a.cs") },
PDB\PortablePdbTests.cs (5)
166
var c = CreateCompilation(
Parse
(source, "goo.cs"), options: TestOptions.DebugDll);
226
var c = CreateCompilation(
Parse
(source, "goo.cs"), options: TestOptions.DebugDll.WithDeterministic(true));
301
var c = CreateCompilation(
Parse
(source, "f:/build/goo.cs"), options: TestOptions.DebugDll);
342
var c = CreateCompilation(
Parse
(source, "f:/build/goo.cs"), options: TestOptions.DebugDll);
381
var c = CreateCompilation(
Parse
(source, "f:/build/goo.cs"), options: TestOptions.DebugDll);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (64)
Attributes\AttributeTests.cs (2)
87
var nodes =
Parse
(aliases).GetRoot().DescendantNodes().OfType<UsingDirectiveSyntax>();
4587
syntaxTrees: new[] {
Parse
("public enum Bar { Baz }") }).EmitToStream(options: new EmitOptions(metadataOnly: true));
Attributes\AttributeTests_CallerInfoAttributes.cs (2)
3374
new[] {
Parse
(source, @"C:\file.cs") },
4622
new[] {
Parse
(source, @"C:\file.cs") },
Attributes\AttributeTests_Experimental.cs (26)
66
var comp1 = CreateCompilation(new[] {
Parse
(ExperimentalAttributeSource),
Parse
(source1) });
207
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(DeprecatedAttributeSource),
Parse
(ExperimentalAttributeSource),
Parse
(source) });
306
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(DeprecatedAttributeSource),
Parse
(ExperimentalAttributeSource),
Parse
(source) });
348
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(DeprecatedAttributeSource),
Parse
(ExperimentalAttributeSource),
Parse
(source) });
368
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(ExperimentalAttributeSource),
Parse
(source) });
397
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(ExperimentalAttributeSource),
Parse
(source) });
426
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(ExperimentalAttributeSource),
Parse
(source) });
457
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(ExperimentalAttributeSource),
Parse
(source) });
494
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(ExperimentalAttributeSource),
Parse
(source) });
533
var comp1 = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(DeprecatedAttributeSource),
Parse
(ExperimentalAttributeSource),
Parse
(source1) });
634
var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(ExperimentalAttributeSource),
Parse
(source) });
Attributes\AttributeTests_Security.cs (2)
1501
var syntaxTree =
Parse
(source);
1619
var syntaxTree =
Parse
(source);
Attributes\AttributeTests_Synthesized.cs (1)
1959
var comp = CreateEmptyCompilation(new SyntaxTree[] {
Parse
("", options: parseOptions) }, references: new[] { diagLibRef, mslibNoStringRef });
Attributes\AttributeTests_WellKnownAttributes.cs (10)
5014
var syntaxTree =
Parse
(source, filename: "test.cs");
5053
var syntaxTree =
Parse
(source, filename: "test.cs", options: parseOptions);
7247
var comp = CreateCompilation(new[] {
Parse
(source0),
Parse
(source1) });
7298
var comp = CreateCompilation(new[] {
Parse
(source0),
Parse
(source1) });
9866
var compilation1 = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(DeprecatedAttributeSourceTH1),
Parse
(source1) });
9949
var compilation1 = CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(DeprecatedAttributeSourceTH2),
Parse
(source1) });
Attributes\InternalsVisibleToAndStrongNameTests.cs (5)
131
var syntaxTree =
Parse
(s, @"IVTAndStrongNameTests\AnotherTempDir\temp.cs", parseOptions);
160
var syntaxTree =
Parse
(s, @"IVTAndStrongNameTests\AnotherTempDir\temp.cs", parseOptions);
188
var syntaxTree =
Parse
(s, @"IVTAndStrongNameTests\AnotherTempDir\temp.cs", TestOptions.RegularWithLegacyStrongName);
256
var syntaxTree =
Parse
(s, @"IVTAndStrongNameTests\AnotherTempDir\temp.cs");
298
var syntaxTree =
Parse
(s, @"IVTAndStrongNameTests\AnotherTempDir\temp.cs");
Diagnostics\DiagnosticAnalyzerTests.cs (8)
3276
var tree1 =
Parse
("partial class A { }");
3277
var tree2 =
Parse
("partial class A { private class B { } }");
3319
var tree1 =
Parse
("partial class A { }");
3320
var tree2 =
Parse
("partial class A { private class B { } }");
3372
var tree1 =
Parse
("partial class A { }");
3373
var tree2 =
Parse
("partial class A { private class B { } }");
3423
var tree1 =
Parse
("partial class A { }");
3424
var tree2 =
Parse
("partial class A { private class B { } }");
Diagnostics\GetDiagnosticsTests.cs (8)
368
var syntaxTree1 =
Parse
(string.Empty, options: new CSharpParseOptions().WithPreprocessorSymbols(new[] { "1" }));
369
var syntaxTree2 =
Parse
(string.Empty, options: new CSharpParseOptions().WithPreprocessorSymbols(new[] { "2" }));
370
var syntaxTree3 =
Parse
(string.Empty, options: new CSharpParseOptions().WithPreprocessorSymbols(new[] { "3" }));
397
var syntaxTree1 =
Parse
(string.Empty, options: parseOptions1);
398
var syntaxTree2 =
Parse
(string.Empty, options: parseOptions2);
399
var syntaxTree3 =
Parse
(string.Empty, options: parseOptions2);
421
var tree1 =
Parse
(string.Empty, options: parseOptions);
422
var tree2 =
Parse
("ref struct X {}", options: parseOptions);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (2)
TupleTests.cs (2)
106
var corlibWithoutVT = CreateEmptyCompilation(new[] {
Parse
(String.Format(versionTemplate, "1") + corlib_cs, options: parseOptions) }, assemblyName: "corlib");
110
var corlibWithVT = CreateEmptyCompilation(new[] {
Parse
(String.Format(versionTemplate, "2") + corlib_cs + valuetuple_cs, options: parseOptions) }, assemblyName: "corlib");
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (7)
IOperation\IOperationTests_ICompoundAssignmentOperation.cs (2)
43
var syntaxTree =
Parse
(source);
79
var syntaxTree =
Parse
(source);
IOperation\IOperationTests_IVariableDeclaration.cs (5)
922
var tree =
Parse
(source, options: TestOptions.Regular);
1214
var syntaxTree =
Parse
(source, filename: "file.cs");
2300
var syntaxTree =
Parse
(source, filename: "file.cs");
2361
var syntaxTree =
Parse
(source, filename: "file.cs");
2829
var syntaxTree =
Parse
(source, filename: "file.cs");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (95)
Semantics\AccessibilityTests.cs (1)
25
var t =
Parse
(@"
Semantics\ArglistTests.cs (1)
956
var tree =
Parse
(text);
Semantics\AwaitExpressionTests.cs (1)
154
var tree =
Parse
(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
Semantics\ColorColorTests.cs (10)
587
var tree =
Parse
(text);
626
var tree =
Parse
(text);
723
var tree =
Parse
(text);
1056
var tree =
Parse
(text);
1102
var tree =
Parse
(text);
1148
var tree =
Parse
(text);
1193
var tree =
Parse
(text);
1234
var tree =
Parse
(text);
1271
var tree =
Parse
(text);
1836
var tree =
Parse
(text);
Semantics\ConditionalOperatorTests.cs (1)
1256
var tree =
Parse
(source, options: parseOptions);
Semantics\DynamicTests.cs (2)
2797
CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(source, options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp5)) }).VerifyDiagnostics(
2914
CreateCompilationWithMscorlib40AndSystemCore(new[] {
Parse
(source, options: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp5)) }).VerifyDiagnostics(
Semantics\ExpressionBodiedMemberTests.cs (1)
113
var tree =
Parse
(@"
Semantics\ForEachTests.cs (1)
3252
var tree =
Parse
(text, options: options);
Semantics\ImplicitlyTypeArraysTests.cs (2)
64
var tree =
Parse
(text);
90
var tree =
Parse
(text);
Semantics\ImportsTests.cs (1)
142
var trees = sources.Select(source =>
Parse
(source)).ToArray();
Semantics\LambdaTests.cs (10)
337
var comp = CreateCompilation(
Parse
(text));
370
new[] {
Parse
(text1) },
384
new[] {
Parse
(text2) },
416
Parse
(text1),
431
Parse
(text2),
442
Parse
(text2),
471
var comp = CreateCompilation(
Parse
(text1));
526
Parse
(csSource),
572
var csProject = CreateCompilation(
Parse
(csSource), new[] { MetadataReference.CreateFromImage(vbMetadata) });
8193
var tree =
Parse
(source);
Semantics\LookupTests.cs (4)
36
var tree =
Parse
(testSrc, options: isScript ? TestOptions.Script : TestOptions.Regular);
617
var srcTrees = new SyntaxTree[] {
Parse
(testSrc) };
674
var srcTrees = new SyntaxTree[] {
Parse
(testSrc) };
1366
var tree =
Parse
(source);
Semantics\MethodBodyModelTests.cs (34)
54
var tree =
Parse
(text);
76
var tree =
Parse
(text);
99
var tree =
Parse
(text);
122
var tree =
Parse
(text);
162
var tree =
Parse
(text);
202
var tree =
Parse
(text);
242
var tree =
Parse
(text);
265
var tree =
Parse
(text);
293
var tree =
Parse
(text);
324
var tree =
Parse
(text);
369
var tree =
Parse
(text);
393
var tree =
Parse
(text);
416
var tree =
Parse
(text);
440
var tree =
Parse
(text);
463
var tree =
Parse
(text);
486
var tree =
Parse
(text);
509
var tree =
Parse
(text);
532
var tree =
Parse
(text);
563
var tree =
Parse
(text);
615
var tree =
Parse
(text);
639
var tree =
Parse
(text);
666
var tree =
Parse
(text);
698
var tree =
Parse
(text);
725
var tree =
Parse
(text);
750
var tree =
Parse
(text);
770
var tree =
Parse
(text);
795
var tree =
Parse
(text);
832
var tree =
Parse
(text);
859
var tree =
Parse
(text);
884
var tree =
Parse
(text);
911
var tree =
Parse
(text);
932
var tree =
Parse
(text);
953
var tree =
Parse
(text);
992
var tree =
Parse
(text);
Semantics\NullableReferenceTypesTests.cs (1)
7756
var tree =
Parse
(source);
Semantics\OutVarTests.cs (2)
34267
var syntaxTree =
Parse
(source, filename: "file.cs");
34481
var syntaxTree =
Parse
(source, filename: "file.cs");
Semantics\PropertyAccessTests.cs (1)
34
source: new[] {
Parse
(text) },
Semantics\ScriptSemanticsTests.cs (7)
519
var tree =
Parse
(source, options: TestOptions.Script);
535
var tree =
Parse
(source, options: TestOptions.Script);
627
var compilation = CreateCompilationWithMscorlib45(new[] {
Parse
(source, options: TestOptions.Script) });
640
var compilation = CreateCompilationWithMscorlib45(new[] {
Parse
(source, options: TestOptions.Script) });
652
var compilation = CreateCompilationWithMscorlib45(new[] {
Parse
(source, options: TestOptions.Script) });
1134
var tree =
Parse
(source, options: TestOptions.Script);
1154
var tree =
Parse
(source, options: TestOptions.Script);
Semantics\SemanticErrorTests.cs (3)
3324
var tree =
Parse
(text);
7888
var comp = CreateCompilation(new[] {
Parse
(test, options: TestOptions.Regular6) }, new MetadataReference[] { });
21730
new[] {
Parse
(text, options: TestOptions.RegularWithDocumentationComments) },
Semantics\StructsTests.cs (2)
376
new[] {
Parse
(@"public struct S { }") },
381
new[] {
Parse
(@"public class C { void M() { S s = new S(); System.Console.WriteLine(s);} }") },
Semantics\TargetTypedConditionalOperatorTests.cs (1)
331
var tree =
Parse
(source, options: parseOptions);
Semantics\TopLevelStatementsTests.cs (4)
1970
Assert.Throws<System.ArgumentException>(() => CreateCompilation(new[] {
Parse
(text1, filename: "text1", DefaultParseOptions),
1971
Parse
(text1, filename: "text2", TestOptions.Regular6) },
8754
var oldTree =
Parse
(text: text1, options: TestOptions.RegularDefault);
8786
var fullParseTree =
Parse
(text: text2, options: TestOptions.RegularDefault);
Semantics\UnsafeTests.cs (2)
8950
var tree =
Parse
(sourceCode);
9047
var tree =
Parse
(sourceCode);
Semantics\UseSiteErrorTests.cs (3)
1035
new[] {
Parse
(srcLib1) },
1049
new[] {
Parse
(srcLib2) },
2257
new[] {
Parse
(corLibText) },
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (346)
Compilation\CompilationAPITests.cs (21)
560
var t1 =
Parse
(@"
568
var t2 =
Parse
(@"
576
var t3 =
Parse
(@"
583
var t4 =
Parse
(@"
1691
var compilation = CSharpCompilation.Create(assemblyName: null, options: TestOptions.ReleaseModule, syntaxTrees: new[] {
Parse
(source) }, references: new[] { MscorlibRef });
1699
compilation = CSharpCompilation.Create(assemblyName: null, options: TestOptions.ReleaseDll, syntaxTrees: new[] {
Parse
(source) }, references: new[] { MscorlibRef });
1707
compilation = CSharpCompilation.Create(assemblyName: "ModuleAssemblyName", options: TestOptions.ReleaseModule, syntaxTrees: new[] {
Parse
(source) }, references: new[] { MscorlibRef });
1743
syntaxTree:
Parse
("true", options: TestOptions.Script)
1751
syntaxTree:
Parse
("false", options: TestOptions.Script))
1813
syntaxTree:
Parse
(source, options: TestOptions.Script));
1837
syntaxTree:
Parse
(source, options: TestOptions.Script));
2067
var ta =
Parse
("class C { }", options: TestOptions.Regular10);
2069
var tb =
Parse
(@"
2072
var tc =
Parse
(@"
2076
var tr =
Parse
(@"
2080
var ts =
Parse
(@"
2209
var c3 = c2.AddSyntaxTrees(
Parse
("public class Main2 { public static int a; }"));
2257
new[] {
Parse
("") },
2278
new[] {
Parse
("") },
2314
new[] {
Parse
(src1) },
2339
new[] {
Parse
(src2) },
Compilation\GetImportScopesTests.cs (16)
21
var tree =
Parse
(text);
412
var tree =
Parse
(text);
431
var tree =
Parse
(text);
453
var tree =
Parse
(text);
474
var tree =
Parse
(text);
494
var tree =
Parse
(text);
510
var tree =
Parse
(text);
530
var tree =
Parse
(text);
561
var tree =
Parse
(text);
586
var tree =
Parse
(text);
612
var tree =
Parse
(text);
613
var comp = CreateCompilationWithExternAlias(new[] { tree,
Parse
(globalImportsText) });
641
var tree =
Parse
(text);
642
var comp = CreateCompilationWithExternAlias(new[] { tree,
Parse
(globalImportsText) });
674
var tree =
Parse
(text);
675
var comp = CreateCompilationWithExternAlias(new[] { tree,
Parse
(globalImportsText) });
Compilation\GetSemanticInfoBrokenCodeTests.cs (12)
28
var tree =
Parse
(text);
47
var tree =
Parse
(text);
70
var tree =
Parse
(text);
93
var tree =
Parse
(text);
106
var tree =
Parse
(text);
131
var tree =
Parse
(text);
158
var tree =
Parse
(text);
175
var tree =
Parse
(text);
314
var tree =
Parse
(text);
329
var tree =
Parse
(text);
344
var tree =
Parse
(text);
359
var tree =
Parse
(text);
Compilation\GetSemanticInfoTests.cs (75)
39
var tree =
Parse
(text);
69
var tree =
Parse
(text);
98
var tree =
Parse
(text);
132
var tree =
Parse
(text);
161
var tree =
Parse
(text);
187
var tree =
Parse
(text);
238
var tree =
Parse
(text);
291
var tree =
Parse
(source);
370
var tree =
Parse
(text);
412
var tree =
Parse
(text);
439
var tree =
Parse
(text);
473
var tree =
Parse
(text);
526
var tree =
Parse
(text);
593
var tree =
Parse
(text);
626
var tree =
Parse
(text);
1021
var tree =
Parse
(text);
1129
var tree =
Parse
(text, options: TestOptions.Script);
1160
var tree =
Parse
(text);
1189
var tree =
Parse
(text);
1213
var tree =
Parse
(text);
1236
var tree =
Parse
(text);
1262
var tree =
Parse
(text);
1290
var tree =
Parse
(text);
1318
var tree =
Parse
(text);
1345
var tree =
Parse
(text);
1372
var tree =
Parse
(text);
1408
var tree =
Parse
(text);
1446
var tree =
Parse
(text);
1484
var tree =
Parse
(text);
1520
var tree =
Parse
(text);
1551
var tree =
Parse
(text);
1573
var tree =
Parse
(text);
1601
var tree =
Parse
(text);
1626
var tree =
Parse
(text);
1665
var tree =
Parse
(text);
1697
var tree =
Parse
(text);
1732
var tree =
Parse
(text);
1767
var tree =
Parse
(text);
1803
var tree =
Parse
(text);
1839
var tree =
Parse
(text);
1880
var tree =
Parse
(text);
1909
var tree =
Parse
(text);
1945
var tree =
Parse
(text);
1981
var tree =
Parse
(text);
2017
var tree =
Parse
(text);
2052
var tree =
Parse
(text);
2218
var tree =
Parse
(string.Format(template, types, constraints));
2316
var tree =
Parse
(text);
2352
var tree =
Parse
(text);
2388
var tree =
Parse
(text);
2447
var tree =
Parse
(text);
2504
var tree =
Parse
(text);
2533
var tree =
Parse
(text);
2716
var tree =
Parse
(text);
2787
var tree =
Parse
(text);
2833
var tree =
Parse
(text);
2863
var tree =
Parse
(text);
2956
var tree =
Parse
(text);
3048
var tree =
Parse
(text);
3090
var tree =
Parse
(text);
3122
var tree =
Parse
(text);
3164
var tree =
Parse
(text);
3196
var tree =
Parse
(text);
3239
var tree =
Parse
(text);
3269
var tree =
Parse
(text);
3323
var tree =
Parse
(text);
3389
var tree =
Parse
(text);
5778
var tree1 =
Parse
(file1);
5779
var tree2 =
Parse
(file2);
5816
var tree1 =
Parse
(file1);
5817
var tree2 =
Parse
(file2);
5818
var tree3 =
Parse
(file3);
5860
var tree1 =
Parse
(file1);
5861
var tree2 =
Parse
(file2);
5862
var tree3 =
Parse
(file3);
Compilation\GetUnusedImportDirectivesTests.cs (9)
32
var tree =
Parse
(text);
89
var tree =
Parse
(consoleApplicationSource);
172
var tree =
Parse
(text);
190
var tree =
Parse
(text);
214
var signing =
Parse
(@"
226
Parse
(@"
248
Parse
(@"
389
var tree =
Parse
("using System;", options: TestOptions.Script);
398
var tree =
Parse
("using System;", options: TestOptions.Script);
Compilation\IndexedProperties_BindingTests.cs (1)
135
var tree =
Parse
(source);
Compilation\LoadDirectiveTests.cs (5)
81
var external2 =
Parse
(code, "external2.csx", TestOptions.Script);
90
var external3 =
Parse
(@"
104
var external4 =
Parse
("#load \"a.csx\"", "external4.csx", TestOptions.Script);
162
var newTree =
Parse
(code, "a.csx", TestOptions.Script);
182
newTree =
Parse
(code, "a.csx", TestOptions.Script);
Compilation\ReferenceManagerTests.cs (11)
740
var tree =
Parse
(source);
864
t1 =
Parse
($"#r \"{p2}\"", options: TestOptions.Script),
865
t2 =
Parse
($"#r \"{p3}\"", options: TestOptions.Script),
866
t3 =
Parse
("#r \"Lib\"", options: TestOptions.Script),
1277
Parse
("#r \"1\"", options: TestOptions.Script),
1278
Parse
("#r \"2.dll\"", options: TestOptions.Script),
1323
Parse
("#r \"throw\"", options: TestOptions.Script),
1335
syntaxTrees: new[] {
Parse
("class C {}") },
1340
var c2 = c1.AddSyntaxTrees(
Parse
("class D { }"));
1349
var t1 =
Parse
(@"
1355
var t2 =
Parse
(@"
Compilation\SemanticModelAPITests.cs (39)
249
var tree =
Parse
(text);
268
var tree =
Parse
(text);
288
var tree =
Parse
(text);
307
var tree =
Parse
(text);
327
var tree =
Parse
(text);
346
var tree =
Parse
(text);
366
var tree1 =
Parse
(text);
367
var tree2 =
Parse
(text);
390
var tree =
Parse
(text);
417
var tree =
Parse
(text);
483
var tree =
Parse
(text);
514
var partial1Tree =
Parse
(partial1);
515
var partial2Tree =
Parse
(partial2);
530
var tree =
Parse
(text);
556
var tree =
Parse
(text);
582
var tree =
Parse
(text);
605
var tree =
Parse
(text);
638
var tree1 =
Parse
(text);
641
var tree2 =
Parse
(text);
670
var tree1 =
Parse
(text);
697
var tree1 =
Parse
(text);
698
var tree2 =
Parse
(text);
721
var tree =
Parse
(text);
747
var tree =
Parse
(text);
778
var tree =
Parse
(text);
813
var tree =
Parse
(text);
839
var tree =
Parse
(text);
865
var tree =
Parse
(text);
921
var tree =
Parse
(text);
958
var tree1 =
Parse
(text1);
959
var tree2 =
Parse
(text2);
999
var tree1 =
Parse
(text1);
1000
var tree2 =
Parse
(text2);
1038
var tree =
Parse
(text);
1069
var tree =
Parse
(text);
1110
var tree =
Parse
(text);
1154
var tree =
Parse
(text);
1190
var tree =
Parse
(text);
4638
var tree =
Parse
(text);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
3898
var tree =
Parse
(sourceCode);
3919
var tree =
Parse
(sourceCode);
Compilation\SemanticModelGetSemanticInfoTests.cs (1)
12122
var tree =
Parse
(sourceCode);
Compilation\UsedAssembliesTests.cs (5)
164
yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.
Parse
(builder.ToString(), tree.FilePath, (CSharpParseOptions)tree.Options)), before, after);
192
yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.
Parse
(builder.ToString(), tree.FilePath, parseOptions)), before, after);
203
yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.
Parse
(builder.ToString(), tree.FilePath, parseOptions)).
204
AddSyntaxTrees(CSharpTestBase.
Parse
(globalUsings, "", parseOptions)), before, after);
2339
AssertUsedAssemblyReferences(CreateCompilation(
Parse
(source, options: TestOptions.Script), references: new[] { reference }, options: TestOptions.DebugDll.WithUsings(@using)),
CrossLanguageTests.cs (1)
34
var tree =
Parse
(text);
DocumentationComments\CrefTests.cs (5)
4417
var tree1 =
Parse
(source1, options: TestOptions.Regular.WithDocumentationMode(DocumentationMode.Diagnose).WithLanguageVersion(LanguageVersion.Latest));
4418
var tree2 =
Parse
(source2, options: TestOptions.Regular.WithDocumentationMode(DocumentationMode.None).WithLanguageVersion(LanguageVersion.Latest));
5122
var tree =
Parse
(source, options: TestOptions.RegularWithDocumentationComments);
5228
SyntaxTree tree =
Parse
(source, options: TestOptions.RegularWithDocumentationComments);
5873
new[] {
Parse
(source, options: TestOptions.RegularWithDocumentationComments) },
DocumentationComments\DocumentationCommentCompilerTests.cs (11)
1664
var revisedSource = new DocumentationCommentAdder().Visit(
Parse
(source).GetCompilationUnitRoot()).ToFullString();
1848
var revisedSource = new DocumentationCommentAdder().Visit(
Parse
(source).GetCompilationUnitRoot()).ToFullString();
2217
var revisedSource = new DocumentationCommentAdder().Visit(
Parse
(source).GetCompilationUnitRoot()).ToFullString();
2472
var tree1 =
Parse
(source1, options: TestOptions.RegularWithDocumentationComments);
2473
var tree2 =
Parse
(source2, options: TestOptions.RegularWithDocumentationComments);
2968
var tree =
Parse
(source, options: TestOptions.RegularWithDocumentationComments);
3830
var tree =
Parse
(source, options: TestOptions.Regular.WithDocumentationMode(DocumentationMode.Parse));
5068
var tree =
Parse
(source, options: TestOptions.RegularWithDocumentationComments);
5320
SyntaxTree tree =
Parse
(source, options: TestOptions.RegularWithDocumentationComments);
6425
var tree =
Parse
(source, options: TestOptions.RegularWithDocumentationComments);
6666
Parse
(source, options: TestOptions.RegularWithDocumentationComments, filename: sourcePath),
DocumentationComments\DocumentationModeTests.cs (2)
352
Parse
(string.Format(sourceTemplate, xml, mode), string.Format("{0}.cs", mode), GetOptions(mode)));
381
Parse
(string.Format(sourceTemplate, includeElement, mode), string.Format("{0}.cs", mode), GetOptions(mode)));
DocumentationComments\PartialTypeDocumentationCommentTests.cs (2)
23
var tree1 =
Parse
(
37
var tree2 =
Parse
(
Symbols\AnonymousTypesSymbolTests.cs (3)
1706
private static readonly SyntaxTree s_equalityComparerSourceTree =
Parse
(@"
1757
var comp = CreateEmptyCompilation(new[] {
Parse
(source), s_equalityComparerSourceTree }, new[] { MinCorlibRef });
1811
var comp = CreateEmptyCompilation(new[] {
Parse
(source), s_equalityComparerSourceTree }, new[] { MinCorlibRef, attributeLib.ToMetadataReference() });
Symbols\CompilationCreationTests.cs (1)
2782
new[] {
Parse
(source, options: TestOptions.Script) },
Symbols\ConversionTests.cs (1)
225
var compilation = CSharpCompilation.Create("Test", new[] {
Parse
(code) }, new[] { mscorlibRef });
Symbols\CorLibrary\CorTypes.cs (1)
156
var c1 = CSharpCompilation.Create("CorLib", syntaxTrees: new[] {
Parse
(source) });
Symbols\IndexerTests.cs (7)
1284
var tree =
Parse
(source);
2229
var tree =
Parse
(source);
2270
var tree =
Parse
(source);
2312
var tree =
Parse
(source);
2350
var tree =
Parse
(source);
2608
var tree =
Parse
(source);
2695
var tree =
Parse
(source);
Symbols\Metadata\PE\NoPia.cs (6)
370
var localTypes1 = CSharpCompilation.Create("LocalTypes1", new[] {
Parse
(localTypes1Source) }, new[] { pia1CopyLink, mscorlibRef });
374
var localTypes2 = CSharpCompilation.Create("LocalTypes2", new[] {
Parse
(localTypes2Source) }, new[] { mscorlibRef, pia1CopyLink });
1009
var varC_LocalTypes3 = CSharpCompilation.Create("LocalTypes3", new[] {
Parse
(localTypes3Source) }, new[] { mscorlibRef, pia1CopyLink });
1106
var varC_Pia5 = CSharpCompilation.Create("Pia5", new[] {
Parse
(pia5Source) }, new[] { mscorlibRef });
1114
var varC_Pia1 = CSharpCompilation.Create("Pia1", new[] {
Parse
(pia1Source) }, new[] { mscorlibRef });
1122
var varC_Library2 = CSharpCompilation.Create("Library2", new[] {
Parse
(library2Source) }, new MetadataReference[] { mscorlibRef, pia1Ref, pia5Ref });
Symbols\OverriddenOrHiddenMembersTests.cs (2)
73
var tree =
Parse
(text);
160
var tree =
Parse
(text);
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
68
var compilation1 = CSharpCompilation.Create("C1", new[] {
Parse
(source) }, new[] { OldMsCorLib }, TestOptions.ReleaseDll);
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
146
CSharpCompilation c1 = CSharpCompilation.Create("C1", new[] {
Parse
(source) }, new[] { oldMsCorLib });
Symbols\Source\AccessTests.cs (7)
27
var tree =
Parse
(text);
44
var tree =
Parse
(text);
70
var tree =
Parse
(text);
93
var tree =
Parse
(text);
122
var tree =
Parse
(text);
144
var tree =
Parse
(text);
167
var tree =
Parse
(text);
Symbols\Source\BaseClassTests.cs (6)
1408
var tree =
Parse
(text);
1424
var tree =
Parse
(text);
1439
var comp = CreateCompilation(
Parse
(text));
1464
var comp = CreateCompilation(
Parse
(text));
1495
var comp = CreateCompilation(
Parse
(text));
1872
var comp = CreateCompilation(
Parse
(text));
Symbols\Source\DeclaringSyntaxNodeTests.cs (12)
257
var tree =
Parse
(text);
300
var tree =
Parse
(text);
602
var tree =
Parse
(text);
637
var tree =
Parse
(text);
662
var tree =
Parse
(text);
688
var tree =
Parse
(text);
717
var tree =
Parse
(text);
732
var source0 =
Parse
("namespace N { partial class C { } } namespace N0 { } class C0 { }");
733
var source1 =
Parse
("namespace N { partial class C { } } namespace N1 { } class C1 { }");
734
var source2 =
Parse
("namespace N { struct S { } }");
735
var source3 =
Parse
("namespace N { partial class C { } } namespace N3 { } class C3 { }");
745
var source4 =
Parse
("namespace N { partial class C { } } namespace N4 { } class C4 { }");
Symbols\Source\DelegateTests.cs (2)
55
source: new[] {
Parse
(source) },
227
var comp = CreateCompilation(
Parse
(text));
Symbols\Source\EventTests.cs (1)
58
var comp = CreateCompilation(
Parse
(text));
Symbols\Source\ExternAliasTests.cs (1)
349
var tree =
Parse
(text);
Symbols\Source\FieldTests.cs (2)
234
var comp = CreateCompilation(
Parse
(text));
254
var comp = CreateCompilation(
Parse
(text));
Symbols\Source\MethodTests.cs (5)
1617
var comp = CreateCompilation(
Parse
(text));
1662
var comp = CreateCompilation(
Parse
(text));
1705
var comp = CreateCompilation(
Parse
(text));
1801
var comp = CreateCompilation(
Parse
(text));
1854
var comp = CreateCompilation(
Parse
(text));
Symbols\Source\PropertyTests.cs (6)
448
var comp = CreateCompilation(
Parse
(text));
1653
var comp = CreateCompilation(
Parse
(text));
1690
var comp = CreateCompilation(
Parse
(text));
1725
var comp = CreateCompilation(
Parse
(text));
1745
var comp = CreateCompilation(
Parse
(text));
1816
var comp = CreateCompilation(
Parse
(text));
Symbols\Source\TypeMapTests.cs (1)
110
var tree =
Parse
(text);
Symbols\Source\UsingAliasTests.cs (22)
29
var tree =
Parse
(text);
86
var tree =
Parse
(text);
146
var tree =
Parse
(text);
201
var tree =
Parse
(text);
266
var tree =
Parse
(text);
293
var tree =
Parse
(text);
339
var tree =
Parse
(text);
380
var tree =
Parse
(text);
401
var tree =
Parse
(text);
420
var tree =
Parse
(text);
439
var tree =
Parse
(text);
458
var tree =
Parse
(text);
477
var tree =
Parse
(text);
498
var tree =
Parse
(text);
520
SyntaxTree syntaxTree =
Parse
(text);
541
SyntaxTree syntaxTree =
Parse
(text);
561
SyntaxTree syntaxTree =
Parse
(text);
580
SyntaxTree syntaxTree =
Parse
(text);
600
SyntaxTree syntaxTree =
Parse
(text);
624
SyntaxTree syntaxTree =
Parse
(text);
647
SyntaxTree syntaxTree =
Parse
(text);
664
SyntaxTree syntaxTree =
Parse
(text);
Symbols\SymbolDistinguisherTests.cs (24)
31
var tree =
Parse
(source, "file.cs");
77
var libRef = new CSharpCompilationReference(CreateCompilation(
Parse
(source, "file1.cs"), assemblyName: "Metadata"));
78
var comp = CreateCompilation(
Parse
(source, "file2.cs"), new[] { libRef }, assemblyName: "Source");
95
var tree =
Parse
(source, "file.cs");
115
var tree =
Parse
(source, "file.cs");
135
var tree =
Parse
(source, @"a\..\file.cs");
180
var tree =
Parse
(source, "file.cs");
206
var tree =
Parse
(source, "file.cs");
231
var tree =
Parse
(source, "file.cs");
256
var tree =
Parse
(source, "file.cs");
278
var tree =
Parse
(source, "file.cs");
351
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
385
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
419
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
451
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
483
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
512
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
547
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
579
var libRef = new CSharpCompilationReference(CreateCompilation(
Parse
(libSource, "file.cs"), assemblyName: "Metadata"));
580
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
612
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
649
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
680
CreateCompilation(
Parse
(source, "file.cs"), new[] { libRef }, assemblyName: "Source").VerifyDiagnostics(
782
var comp1 = CreateCompilation(
Parse
(source1), new[] { ref0 });
Symbols\SymbolErrorTests.cs (9)
2110
var tree =
Parse
(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
2528
var comp = CreateCompilation(
Parse
(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)));
5440
comp = CreateCompilation(new SyntaxTree[] {
Parse
(text, "goo.cs") }, new List<MetadataReference> { ref1 });
16761
CreateCompilationWithMscorlib45(new[] {
Parse
(text, options: TestOptions.Script) }).VerifyDiagnostics(expectedDiagnostics);
17648
var tree =
Parse
(sourceLib, filename: @"C:\lib.cs");
17729
var tree =
Parse
(sourceLib, filename: @"C:\lib.cs");
17764
CreateCompilation(new SyntaxTree[] {
Parse
(text, "goo.cs") }).VerifyDiagnostics(
17794
CreateCompilation(new SyntaxTree[] {
Parse
(text, "goo.cs") }).VerifyDiagnostics(
17853
Parse
(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)));
Symbols\TypeResolutionTests.cs (1)
51
syntaxTrees: new[] {
Parse
(source1) },
Symbols\TypeTests.cs (6)
815
new[] {
Parse
(mainSrc, options: TestOptions.Script) },
828
new[] {
Parse
(mainSrc, options: TestOptions.Script) },
1137
var tree =
Parse
(text);
1151
var tree =
Parse
(text);
1176
var tree =
Parse
(text);
1195
var tree =
Parse
(text);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Diagnostics\DiagnosticTest.cs (1)
2448
var tree =
Parse
(text);
Parsing\ParserErrorMessageTests.cs (3)
5858
tree =
Parse
(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5));
6680
var parsedTree =
Parse
(builder.ToString());
6713
var parsedTree =
Parse
(builder.ToString());
Parsing\PatternParsingTests.cs (2)
3028
Parse
(source, options: TestOptions.RegularWithRecursivePatterns);
3034
Parse
(source2, options: TestOptions.RegularWithRecursivePatterns);
Syntax\SyntaxRewriterTests.cs (1)
649
var oldTree = CSharpTestBase.
Parse
(oldSource, options: TestOptions.RegularWithDocumentationComments);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
CSharpTestBase.cs (4)
1017
return sources.Select((src, index) =>
Parse
(src, filename: $"{index}.cs", options: options)).ToArray();
1022
var tree =
Parse
(text, options: options ?? TestOptions.RegularPreview);
1384
syntaxTree:
Parse
(source, options: parseOptions ?? TestOptions.Script),
1407
syntaxTree:
Parse
(code, options: parseOptions ?? TestOptions.Script),
CSharpTestSource.cs (1)
68
return new[] { CSharpTestBase.
Parse
(source, fileName, parseOptions) };
Microsoft.CodeAnalysis.Rebuild.UnitTests (3)
CSharpDeterministicKeyBuilderTests.cs (3)
34
CSharpTestBase.
Parse
(
158
var source = CSharpTestBase.
Parse
(
194
var syntaxTree = CSharpTestBase.
Parse
(