775 references to Script
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (13)
CodeActions\MoveType\CSharpMoveTypeTestsBase.cs (1)
14protected override ParseOptions GetScriptOptions() => TestOptions.Script;
Formatting\FormattingEngineTests.cs (1)
2220var tree = SyntaxFactory.ParseSyntaxTree(code, options: TestOptions.Script);
Formatting\Indentation\SmartIndenterTests.cs (5)
1725options: TestOptions.Script); 1742options: TestOptions.Script); 3454: new[] { TestOptions.Regular, TestOptions.Script }; 3510: new[] { TestOptions.Regular, TestOptions.Script }; 3539: new[] { TestOptions.Regular, TestOptions.Script };
Interactive\BraceMatching\InteractiveBraceHighlightingTests.cs (4)
53using var workspace = EditorTestWorkspace.CreateCSharp(code, parseOptions: TestOptions.Script); 81using var workspace = EditorTestWorkspace.CreateCSharp(code, TestOptions.Script); 110using var workspace = EditorTestWorkspace.CreateCSharp(code, parseOptions: TestOptions.Script); 166using var workspace = EditorTestWorkspace.CreateCSharp(code, parseOptions: TestOptions.Script);
KeywordHighlighting\AbstractCSharpKeywordHighlighterTests.cs (1)
23yield return TestOptions.Script;
TextStructureNavigation\TextStructureNavigatorTests.cs (1)
495TestNavigator(code, func, startPosition, startLength, endPosition, endLength, TestOptions.Script);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (71)
CodeGen\CodeGenAsyncTests.cs (7)
4508var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 4517var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 4527var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 4542var s0 = CSharpCompilation.CreateScriptCompilation("s0.dll", SyntaxFactory.ParseSyntaxTree(source0, options: TestOptions.Script), references); 4543var s1 = CSharpCompilation.CreateScriptCompilation("s1.dll", SyntaxFactory.ParseSyntaxTree(source1, options: TestOptions.Script), references, previousScriptCompilation: s0); 4553var s0 = CSharpCompilation.CreateScriptCompilation("s0.dll", SyntaxFactory.ParseSyntaxTree(source0, options: TestOptions.Script), references); 4571var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe);
CodeGen\CodeGenDeconstructTests.cs (25)
5046var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5137var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5151var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5197var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5212var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5321var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5357var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5371var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp6), options: TestOptions.DebugExe, references: s_valueTupleRefs); 5391var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5424var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5459var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5494var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5525var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5557var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5582var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5630var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5671var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5716var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5758var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5797var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 5847var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 6877var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 6896var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 6911var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs); 6946var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe, references: s_valueTupleRefs);
CodeGen\CodeGenDynamicTests.cs (2)
7493new[] { Parse(sourceScript, options: TestOptions.Script) }, 7591new[] { Parse(sourceScript, options: TestOptions.Script) },
CodeGen\CodeGenFieldInitTests.cs (1)
654trees.Add(SyntaxFactory.ParseSyntaxTree("System.Console.WriteLine(" + i + ");", options: TestOptions.Script));
CodeGen\CodeGenScriptTests.cs (12)
25var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 44var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 62var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 88var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 113var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 138var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 169var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 197var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 496var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 555SyntaxFactory.ParseSyntaxTree(source0, options: TestOptions.Script), 603var compilation = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 636var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script);
CodeGen\GotoTest.cs (17)
932var compilation = CreateCompilationWithMscorlib461(source, references: new[] { SystemCoreRef }, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 947var compilation = CreateCompilationWithMscorlib461(source, references: new[] { SystemCoreRef }, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 983var compilation = CreateCompilationWithMscorlib461(source, references: new[] { SystemCoreRef }, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 1000var s0 = CSharpCompilation.CreateScriptCompilation("s0.dll", SyntaxFactory.ParseSyntaxTree(source0, options: TestOptions.Script), references); 1002var s1 = CSharpCompilation.CreateScriptCompilation("s1.dll", SyntaxFactory.ParseSyntaxTree(source1, options: TestOptions.Script), references, previousScriptCompilation: s0); 1019var compilation = CreateCompilationWithMscorlib461(source, references: new[] { SystemCoreRef }, parseOptions: TestOptions.Script); 1039var compilation = CreateCompilationWithMscorlib461(source, references: new[] { SystemCoreRef }, parseOptions: TestOptions.Script); 1066var compilation = CreateCompilationWithMscorlib461(source, references: new[] { SystemCoreRef }, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 1086var compilation = CreateCompilationWithMscorlib461(source, references: new[] { SystemCoreRef }, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 1111var s0 = CSharpCompilation.CreateScriptCompilation("s0.dll", SyntaxFactory.ParseSyntaxTree(source0, options: TestOptions.Script), references); 1113var s1 = CSharpCompilation.CreateScriptCompilation("s1.dll", SyntaxFactory.ParseSyntaxTree(source1, options: TestOptions.Script), references, previousScriptCompilation: s0); 1129var compilation = CreateCompilationWithMscorlib461(sourceB, options: options, parseOptions: TestOptions.Script); 1146var tree = Parse(source, options: TestOptions.Script); 1159var tree = Parse(source, options: TestOptions.Script); 1173var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script); 1188compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script); 1201compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script);
Emit\EntryPointTests.cs (7)
283Parse(csx, options: TestOptions.Script), 374SyntaxFactory.ParseSyntaxTree(csx, options: TestOptions.Script), 395SyntaxFactory.ParseSyntaxTree(csx, options: TestOptions.Script), 726new[] { SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.Script) }, 749SyntaxFactory.ParseSyntaxTree(csx, options: TestOptions.Script), 783SyntaxFactory.ParseSyntaxTree(csx, options: TestOptions.Script), 930SyntaxFactory.ParseSyntaxTree(csx, options: TestOptions.Script),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (183)
Attributes\AttributeTests_Dynamic.cs (9)
821parseOptions: TestOptions.Script, 839CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script).VerifyDiagnostics( 854parseOptions: TestOptions.Script, 871var comp = CreateCompilationWithMscorlib461(source: source, parseOptions: TestOptions.Script).VerifyDiagnostics( 889parseOptions: TestOptions.Script, 911parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.Preview), 930var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script).VerifyDiagnostics( 944var comp = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script).VerifyDiagnostics( 1333CreateCompilationWithMscorlib461(source: source, parseOptions: TestOptions.Script).VerifyDiagnostics(
Attributes\AttributeTests_WellKnownAttributes.cs (1)
5016var script = CreateCompilation("", parseOptions: TestOptions.Script);
Semantics\OutVarTests.cs (91)
23184var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 23388var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 23433var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 23519var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 23635var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 23855var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 23973var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 24201var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 24272var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 24489var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 24520var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 24635var compilation = CreateCompilationWithMscorlib461(source, new[] { SystemCoreRef }, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 25170var compilation = CreateCompilationWithMscorlib461(source, new[] { SystemCoreRef }, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 25258var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 25499var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 25544var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 25669var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 25785var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 25849var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26006var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26146var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26194var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26247var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26389var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26530var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26674var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26814var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26865var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 26995var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 27135var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 27288var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 27427var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 27485var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 27662var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 27820var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 27875var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28053var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28218var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28277var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28428var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28565var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28613var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28669options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28837var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 28988var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 29128var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 29192var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 29368var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 29530var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 29643options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 29844options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30032options: TestOptions.DebugExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30099var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30271var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30425var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30478var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30519var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30563var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30608var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30666var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30837var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 30993var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31046var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31087var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31131var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31191var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31364var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31521var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31574var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31615var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31659var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31704var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31748var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31835var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 31928var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32015parseOptions: TestOptions.Script); 32103var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32147var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32187var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32227var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script, skipUsesIsNullable: true); 32267var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script, skipUsesIsNullable: true); 32307var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script, skipUsesIsNullable: true); 32326compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script, skipUsesIsNullable: true); 32362var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script, skipUsesIsNullable: true); 32379compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script, skipUsesIsNullable: true); 32416var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32456var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32544var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32572var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32600var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 32626var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script);
Semantics\PatternMatchingTests_Global.cs (82)
53var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 175var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 286var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 345var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 497var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 632var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 674var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 722var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 859var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 995var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 1127var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 1255var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 1301var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 1426var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 1561var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 1709var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 1843var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 1898var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2069var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2220var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2272var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2444var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2602var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2656var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2802var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2934var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 2980var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 3033options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 3192var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 3338var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 3473var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 3532var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 3703var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 3856var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.DebugExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 3916options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4114options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4295options: TestOptions.DebugExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4357var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4524var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4669var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4713var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4749var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4788var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4824var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 4877var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5043var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5190var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5234var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5270var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5309var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5364var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5549var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5719var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5768var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5804var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5843var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5884var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5923var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6008var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6095var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6178parseOptions: TestOptions.Script); 6260var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6289var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6317var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6341var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6370var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6393var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6487var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6679var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6719var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6796var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 6906var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 7120var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 7223var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 7445var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 7504var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 7703var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 7728var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 7837var compilation = CreateCompilationWithMscorlib461(source, new[] { SystemCoreRef }, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 8366var compilation = CreateCompilationWithMscorlib461(source, new[] { SystemCoreRef }, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 8448var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 8683var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
CodeActions\AbstractCSharpCodeActionTest_NoEditor.cs (1)
14protected override ParseOptions GetScriptOptions() => TestOptions.Script;
ExtractMethod\ExtractLocalFunctionTests.cs (5)
5424await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp9), index: 1); 5576await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex); 5625await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex); 5676await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex); 5713await TestAsync(code, expected, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp7), index: CodeActionIndex);
IntroduceVariable\InteractiveIntroduceVariableTests.cs (1)
27=> TestAsync(initial, expected, TestOptions.Script, null, index);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (6)
IOperation\IOperationTests.cs (1)
505var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script);
IOperation\IOperationTests_IFieldReferenceExpression.cs (5)
75parseOptions: TestOptions.Script); 101parseOptions: TestOptions.Script); 125parseOptions: TestOptions.Script); 151parseOptions: TestOptions.Script); 176parseOptions: TestOptions.Script);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (76)
Semantics\BindingAsyncTests.cs (2)
3144var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script); 3163syntaxTree: SyntaxFactory.ParseSyntaxTree(source0, options: TestOptions.Script),
Semantics\DeconstructionTests.cs (20)
4332var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 4363var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 4597var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 4619var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 4739var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 4749var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 4886var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 4896var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 4968var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 4978var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 5075var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 5085var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 5290var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 5321var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 5577var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 5599var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 5727var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 5755var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script); 5943var comp1 = CreateCompilation(source1, parseOptions: TestOptions.Script); 5962var comp2 = CreateCompilation(source2, parseOptions: TestOptions.Script);
Semantics\ImplicitlyTypedLocalsTests.cs (1)
55CreateCompilationWithMscorlib461(text, parseOptions: TestOptions.Script).VerifyDiagnostics(
Semantics\InteractiveSemanticModelTests.cs (2)
35parseOptions: TestOptions.Script, 357var compilation = CreateCompilation(testSrc, parseOptions: TestOptions.Script);
Semantics\IteratorTests.cs (2)
442var comp = CreateCompilationWithMscorlib461(text, parseOptions: TestOptions.Script); 474var comp = CreateCompilationWithMscorlib461(text, parseOptions: TestOptions.Script);
Semantics\LookupTests.cs (1)
36var tree = Parse(testSrc, options: isScript ? TestOptions.Script : TestOptions.Regular);
Semantics\NullableReferenceTypesTests.cs (2)
81300parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp8)); 81371var comp = CreateCompilationWithMscorlib40AndSystemCore(new[] { source }, parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp8));
Semantics\QueryTests.cs (2)
2713var compilation = CreateCompilationWithMscorlib40AndSystemCore(sourceCode, parseOptions: TestOptions.Script); 2739var compilation = CreateCompilationWithMscorlib40AndSystemCore(sourceCode, parseOptions: TestOptions.Script);
Semantics\RefFieldTests.cs (3)
12109var comp = CreateCompilation(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 12479var comp = CreateCompilation(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 12889var comp = CreateCompilation(source, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script);
Semantics\RefLocalsAndReturnsTests.cs (2)
5239var comp = CreateCompilation(code, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script); 5278var comp = CreateCompilation(code, options: TestOptions.ReleaseExe.WithScriptClassName("Script"), parseOptions: TestOptions.Script);
Semantics\ScriptSemanticsTests.cs (22)
99parseOptions: TestOptions.Script, 116parseOptions: TestOptions.Script, 141parseOptions: TestOptions.Script.WithNoRefSafetyRulesAttribute(), 161parseOptions: TestOptions.Script, 190parseOptions: TestOptions.Script, 209parseOptions: TestOptions.Script, 235var compilation = CreateCompilationWithMscorlib461(test, parseOptions: TestOptions.Script); 263var tree = SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.Script); 286var tree = SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.Script); 298var submission = CSharpCompilation.CreateScriptCompilation("test", syntaxTree: SyntaxFactory.ParseSyntaxTree("1", options: TestOptions.Script), returnType: typeof(int)); 365var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 396var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 443var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 485var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp6)); 519var tree = Parse(source, options: TestOptions.Script); 535var tree = Parse(source, options: TestOptions.Script); 627var compilation = CreateCompilationWithMscorlib461(new[] { Parse(source, options: TestOptions.Script) }); 640var compilation = CreateCompilationWithMscorlib461(new[] { Parse(source, options: TestOptions.Script) }); 652var compilation = CreateCompilationWithMscorlib461(new[] { Parse(source, options: TestOptions.Script) }); 1134var tree = Parse(source, options: TestOptions.Script); 1154var tree = Parse(source, options: TestOptions.Script); 1373parseOptions: TestOptions.Script,
Semantics\SemanticErrorTests.cs (10)
1385new[] { SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.Script) }); 11702", parseOptions: TestOptions.Script).VerifyDiagnostics( 11880", parseOptions: TestOptions.Script).VerifyDiagnostics( 12149", parseOptions: TestOptions.Script).VerifyDiagnostics( 12189", parseOptions: TestOptions.Script).VerifyDiagnostics( 12224", parseOptions: TestOptions.Script).VerifyDiagnostics( 12256", parseOptions: TestOptions.Script).VerifyDiagnostics( 12321", parseOptions: TestOptions.Script).VerifyDiagnostics( 12332", parseOptions: TestOptions.Script).VerifyDiagnostics( 12345", parseOptions: TestOptions.Script).VerifyDiagnostics(
Semantics\StructConstructorTests.cs (1)
3870var comp = CreateCompilation(source, parseOptions: TestOptions.Script, targetFramework: TargetFramework.NetCoreApp);
Semantics\SwitchTests.cs (2)
2395CreateCompilationWithMscorlib461(source, references: new[] { SystemCoreRef }, parseOptions: TestOptions.Script).VerifyDiagnostics( 2419syntaxTree: SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.Script),
Semantics\SyntaxTreeRootTests.cs (1)
73options: TestOptions.Script);
Semantics\UnsafeTests.cs (3)
11250CreateCompilationWithMscorlibAndSpan(text, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.Script).VerifyDiagnostics( 11264CreateCompilationWithMscorlibAndSpan(text, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.Script).VerifyDiagnostics( 11277CreateCompilationWithMscorlibAndSpan(text, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.Script).VerifyDiagnostics(
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (85)
Compilation\CompilationAPITests.cs (23)
562", filename: "1.csx", options: TestOptions.Script); 570", options: TestOptions.Script); 577", filename: "1.csx", options: TestOptions.Script); 584", filename: "4.csx", options: TestOptions.Script); 1742syntaxTree: Parse("true", options: TestOptions.Script) 1750syntaxTree: Parse("false", options: TestOptions.Script)) 1768var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Script); 1789var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script); 1812syntaxTree: Parse(source, options: TestOptions.Script)); 1836syntaxTree: Parse(source, options: TestOptions.Script)); 2069class C { }", options: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp10)); 2077class C { }", options: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp10)); 2081class C { }", options: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp10)); 2431Assert.True(CreateSubmission("1", parseOptions: TestOptions.Script).HasSubmissionResult()); 2432Assert.False(CreateSubmission("1;", parseOptions: TestOptions.Script).HasSubmissionResult()); 2433Assert.False(CreateSubmission("void goo() { }", parseOptions: TestOptions.Script).HasSubmissionResult()); 2434Assert.False(CreateSubmission("using System;", parseOptions: TestOptions.Script).HasSubmissionResult()); 2435Assert.False(CreateSubmission("int i;", parseOptions: TestOptions.Script).HasSubmissionResult()); 2436Assert.False(CreateSubmission("System.Console.WriteLine();", parseOptions: TestOptions.Script).HasSubmissionResult()); 2437Assert.False(CreateSubmission("System.Console.WriteLine()", parseOptions: TestOptions.Script).HasSubmissionResult()); 2438Assert.True(CreateSubmission("null", parseOptions: TestOptions.Script).HasSubmissionResult()); 2439Assert.True(CreateSubmission("System.Console.WriteLine", parseOptions: TestOptions.Script).HasSubmissionResult()); 339342", parseOptions: TestOptions.Script);
Compilation\GetSemanticInfoTests.cs (1)
1129var tree = Parse(text, options: TestOptions.Script);
Compilation\GetUnusedImportDirectivesTests.cs (2)
389var tree = Parse("using System;", options: TestOptions.Script); 398var tree = Parse("using System;", options: TestOptions.Script);
Compilation\LoadDirectiveTests.cs (13)
22var compilation = CreateCompilationWithMscorlib461(code, options: options, parseOptions: TestOptions.Script); 35var compilation = CreateCompilationWithMscorlib461(code, options: options, parseOptions: TestOptions.Script); 54var compilation = CreateCompilationWithMscorlib461(code, options: options, parseOptions: TestOptions.Script); 79var compilation = CreateCompilationWithMscorlib461(code, sourceFileName: "external1.csx", options: options, parseOptions: TestOptions.Script); 81var external2 = Parse(code, "external2.csx", TestOptions.Script); 92#load ""a.csx""", filename: "external3.csx", options: TestOptions.Script); 104var external4 = Parse("#load \"a.csx\"", "external4.csx", TestOptions.Script); 129var compilation = CreateCompilationWithMscorlib461(code, parseOptions: TestOptions.Script); 145var compilation = CreateCompilationWithMscorlib461(code, parseOptions: TestOptions.Script); 157var compilation = CreateCompilationWithMscorlib461(code, options: options, parseOptions: TestOptions.Script); 162var newTree = Parse(code, "a.csx", TestOptions.Script); 177compilation = CreateCompilationWithMscorlib461(code, options: options, parseOptions: TestOptions.Script); 182newTree = Parse(code, "a.csx", TestOptions.Script);
Compilation\ReferenceManagerTests.cs (8)
864t1 = Parse($"#r \"{p2}\"", options: TestOptions.Script), 865t2 = Parse($"#r \"{p3}\"", options: TestOptions.Script), 866t3 = Parse("#r \"Lib\"", options: TestOptions.Script), 1277Parse("#r \"1\"", options: TestOptions.Script), 1278Parse("#r \"2.dll\"", options: TestOptions.Script), 1323Parse("#r \"throw\"", options: TestOptions.Script), 1351", filename: @"C:\A\a.csx", options: TestOptions.Script); 1357", filename: @"C:\B\b.csx", options: TestOptions.Script);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (4)
3681var parseOptions = TestOptions.Script; 3784", parseOptions: TestOptions.Script 3803var compilation = CreateCompilation(code, parseOptions: TestOptions.Script); 3844var compilation = CreateCompilationWithMscorlib40AndSystemCore(sourceCode, parseOptions: TestOptions.Script);
Compilation\UsedAssembliesTests.cs (9)
2339AssertUsedAssemblyReferences(CreateCompilation(Parse(source, options: TestOptions.Script), references: new[] { reference }, options: TestOptions.DebugDll.WithUsings(@using)), 4012parseOptions: TestOptions.Script.WithDocumentationMode(DocumentationMode.None), 4016parseOptions: TestOptions.Script.WithDocumentationMode(DocumentationMode.Parse), 4607parseOptions: TestOptions.Script.WithDocumentationMode(DocumentationMode.None), 4611parseOptions: TestOptions.Script.WithDocumentationMode(DocumentationMode.Parse), 4615parseOptions: TestOptions.Script.WithDocumentationMode(DocumentationMode.None), 4619parseOptions: TestOptions.Script.WithDocumentationMode(DocumentationMode.Parse), 4798parseOptions: TestOptions.Script.WithDocumentationMode(DocumentationMode.None), 4802parseOptions: TestOptions.Script.WithDocumentationMode(DocumentationMode.Parse),
SymbolDisplay\SymbolDisplayTests.cs (1)
2851var tree = SyntaxFactory.ParseSyntaxTree(text, TestOptions.Script);
Symbols\CompilationCreationTests.cs (8)
2688", options: TestOptions.Script), 2692", options: TestOptions.Script), 2698", options: TestOptions.Script) 2731", options: TestOptions.Script), 2783new[] { Parse(source, options: TestOptions.Script) }, 2793new[] { SyntaxFactory.ParseSyntaxTree(@"#r ""bar""", TestOptions.Script, "a.csx", Encoding.UTF8) }, 2810", options: TestOptions.Script), 2838", options: TestOptions.Script)
Symbols\ExtensionMethodTests.cs (3)
2423var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp6)); 3800var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script); 3807var parseOptions = TestOptions.Script;
Symbols\ImplicitClassTests.cs (2)
58", parseOptions: TestOptions.Script); 84", parseOptions: TestOptions.Script);
Symbols\RequiredMembersTests.cs (2)
6280""", new[] { reference }, parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.Preview)); 6299""", new[] { reference }, parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.Preview));
Symbols\Source\ExternAliasTests.cs (2)
100var comp = CreateCompilationWithMscorlib461(src, options: TestOptions.DebugExe, parseOptions: TestOptions.Script); 112syntaxTree: SyntaxFactory.ParseSyntaxTree(src, options: TestOptions.Script),
Symbols\Source\FileModifierTests.cs (1)
4089var comp = CreateSubmission(source1, parseOptions: TestOptions.Script.WithLanguageVersion(LanguageVersion.Preview));
Symbols\Source\ModifierTests.cs (1)
111var comp = CreateCompilationWithMscorlib461(text, parseOptions: TestOptions.Script);
Symbols\SymbolErrorTests.cs (3)
16853CreateCompilationWithMscorlib461(new[] { Parse(text, options: TestOptions.Script) }).VerifyDiagnostics(expectedDiagnostics); 20458var compilation = CreateCompilationWithMscorlib461(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe); 20480var submission = CSharpCompilation.CreateScriptCompilation("s0.dll", SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.Script), new[] { MscorlibRef_v4_0_30316_17626, SystemCoreRef });
Symbols\TypeTests.cs (2)
816new[] { Parse(mainSrc, options: TestOptions.Script) }, 829new[] { Parse(mainSrc, options: TestOptions.Script) },
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (332)
IncrementalParsing\BinaryExpression.cs (4)
176MakeChange(oldStyle, newStyle, options: TestOptions.Script); 177MakeChange(oldStyle, newStyle, topLevel: true, options: TestOptions.Script); 183MakeChange(oldStyle, newStyle, options: TestOptions.Script); 184MakeChange(oldStyle, newStyle, topLevel: true, options: TestOptions.Script);
IncrementalParsing\ChangingAsync.cs (1)
62ParseAndValidate(text, validator, TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp5));
IncrementalParsing\ChangingIdentifiers.cs (2)
244MakeIncrementalNameChanges(oldStyle, newStyle, expressionValidator, options: TestOptions.Script); 245MakeIncrementalNameChanges(oldStyle, newStyle, expressionValidator, topLevel: true, options: TestOptions.Script);
IncrementalParsing\CompoundAssignment.cs (2)
89MakeAssignmentChanges(oldStyle, newStyle, options: TestOptions.Script); 90MakeAssignmentChanges(oldStyle, newStyle, topLevel: true, options: TestOptions.Script);
IncrementalParsing\IncrementalParsingTests.cs (8)
436var oldTree = SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.Script); 460var oldTree = SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.Script); 2782var startTree = SyntaxFactory.ParseSyntaxTree(oldText, options: TestOptions.Script); 2795var parsedTree = SyntaxFactory.ParseSyntaxTree(newText, options: TestOptions.Script); 2811var startTree = SyntaxFactory.ParseSyntaxTree(oldText, options: TestOptions.Script); 2826var parsedTree = SyntaxFactory.ParseSyntaxTree(newText, options: TestOptions.Script); 2841var startTree = SyntaxFactory.ParseSyntaxTree(oldText, options: TestOptions.Script); 2853var parsedTree = SyntaxFactory.ParseSyntaxTree(newText, options: TestOptions.Script);
IncrementalParsing\TypeChanges.cs (1)
150ParseAndValidate(text, validator, TestOptions.Script);
IncrementalParsing\UnaryExpression.cs (2)
65MakeUnaryChanges(oldStyle, newStyle, options: TestOptions.Script); 66MakeUnaryChanges(oldStyle, newStyle, topLevel: true, options: TestOptions.Script);
LexicalAndXml\DisabledRegionTests.cs (1)
119ParserErrorMessageTests.ParseAndValidate(source, TestOptions.Script,
LexicalAndXml\LexicalErrorTests.cs (1)
498ParserErrorMessageTests.ParseAndValidate(test, TestOptions.Script, Diagnostic(ErrorCode.ERR_PPReferenceFollowsToken, "r"));
Parsing\DeclarationScopeParsingTests.cs (3)
3338UsingTree(source, TestOptions.Script); 3373UsingTree(source, TestOptions.Script, 3429UsingTree(source, TestOptions.Script,
Parsing\DeconstructionTests.cs (2)
1580var tree = UsingTree(@" (int x, int y) = (1, 2); ", options: TestOptions.Script); 1656var tree = UsingTree(@" foreach ((int x, int y) in new[] { (1, 2) }) { }; ", options: TestOptions.Script);
Parsing\MemberDeclarationParsingTests.cs (183)
29public static readonly IEnumerable<object[]> Regular10AndScriptAndRequiredMembersMinimum = new[] { new[] { TestOptions.Regular10 }, new[] { RequiredMembersOptions }, new[] { TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp10) } }; 30public static readonly IEnumerable<object[]> Regular10AndScript = new[] { new[] { TestOptions.Regular10 }, new[] { TestOptions.Script.WithLanguageVersion(LanguageVersion.CSharp10) } }; 117foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 142foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 153foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 171foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 200foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 248foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 299foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 326foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 369foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 776foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 824foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 872foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 915foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 958foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 1005foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 1052foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 1086foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 1134foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 1168foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 2347foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 2489foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 2613foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 2719foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 2825foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 2879foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 2959foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3014foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3065foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3125foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3228foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3373foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3501foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3611foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3721foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3779foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3863foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3922foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 3977foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4041foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4116foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4178foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4267foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4401foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4518foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4617foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4716foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4769foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4848foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4902foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 4952foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5011foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5107foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5245foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5366foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5469foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5572foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5629foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5712foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5770foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5824foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5887foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 5961foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6022foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6084foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6159foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6229foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6292foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6392foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6459foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6543foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6643foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6696foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6758foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6812foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6862foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 6921foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7017foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7130foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7234foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7338foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7442foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7499foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7565foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7623foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7677foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7740foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7814foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7875foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7937foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 7994foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8048foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8102foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8161foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8207foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8272foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8321foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8382foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8441foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8487foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8545foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8890foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 8944foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 9006foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 9068foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 9114foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 12414foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 12677foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 12769foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 12844foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 12927foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13010foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13097foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13181foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13260foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13339foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13426foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13513foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13604foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13715foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13789foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13863foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 13945foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14027foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14106foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14192foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14275foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14369foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14460foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14546foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14629foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14704foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14779foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14862foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 14945foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15076foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15210foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15268foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15326foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15384foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15442foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15521foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15600foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15683foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15770foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15861foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 15942foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 16036foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 16150foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 16303foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 16473foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 16582foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 16711foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 16892foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17090foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17160foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17224foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17281foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17354foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17421foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17483foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17553foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17637foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17700foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17770foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17854foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17906foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 17980foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18069foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18170foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18274foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18375foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18473foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18522foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18583foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18708foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18787foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18883foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 18978foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 19059foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 19141foreach (var options in new[] { TestOptions.Script, TestOptions.Regular }) 19213foreach (var options in new[] { TestOptions.Script, TestOptions.Regular })
Parsing\ScriptParsingTests.cs (109)
25return SyntaxFactory.ParseSyntaxTree(text, options: options ?? TestOptions.Script); 77ParseAndValidate(test, TestOptions.Script, 2598ParseAndValidate(test, TestOptions.Script); 2602ParseAndValidate(test, TestOptions.Script); 2606ParseAndValidate(test, TestOptions.Script); 2612var tree = UsingTree(@"a * b;", TestOptions.Script); 2642var tree = UsingTree(@"a * b", TestOptions.Script); 2675var tree = UsingTree(@"a<t>.n * f(x)", TestOptions.Script); 2811var tree = UsingTree(@"T ? a;", TestOptions.Script); 2841var tree = UsingTree(@"T ? b, c = 1;", TestOptions.Script); 2884var tree = UsingTree(@"T ? b = d => { };", TestOptions.Script); 2931var tree = UsingTree(@"T ? b = x ? y : z;", TestOptions.Script); 2981var tree = UsingTree(@"T ? a,", TestOptions.Script, 3023var tree = UsingTree(@"T ? a = 1,", TestOptions.Script, 3074var tree = UsingTree(@"T ? a {", TestOptions.Script, 3105var tree = UsingTree(@"T ? a.b {", TestOptions.Script, 3144var tree = UsingTree(@"T ? a<T>.b {", TestOptions.Script, 3192var tree = UsingTree(@"T ? a<T?>.b<S>.c {", TestOptions.Script, 3263var tree = UsingTree(@"T ? a() {", TestOptions.Script, 3299var tree = UsingTree(@"T ? a() where", TestOptions.Script, 3356var tree = UsingTree(@"T ? a(T b", TestOptions.Script, 3399var tree = UsingTree(@"T ? a.b(T c", TestOptions.Script, 3450var tree = UsingTree(@"T ? a<A>.b<B>(C c", TestOptions.Script, 3519var tree = UsingTree(@"T ? a([Attr]C c", TestOptions.Script, 3574var tree = UsingTree(@"T ? a([Attr(a = b)]c", TestOptions.Script, 3652var tree = UsingTree(@"T ? a(out C c", TestOptions.Script, 3696var tree = UsingTree(@"T ? a(C[] a", TestOptions.Script, 3751var tree = UsingTree(@"T ? a(params", TestOptions.Script, 3801var tree = UsingTree(@"T ? a(out T ? b", TestOptions.Script, 3849var tree = UsingTree(@"T ? a(ref T ? b", TestOptions.Script, 3897var tree = UsingTree(@"T ? a(params T ? b", TestOptions.Script, 3945var tree = UsingTree(@"T ? a([Attr]T ? b", TestOptions.Script, 4004var tree = UsingTree(@"T ? a(T ? b,", TestOptions.Script, 4066var tree = UsingTree(@"T ? a(T ? b)", TestOptions.Script, 4110var tree = UsingTree(@"T ? a(T c)", TestOptions.Script, 4150var tree = UsingTree(@"T ? a(this c d", TestOptions.Script, 4194var tree = UsingTree(@"T ? a(ref out T a", TestOptions.Script, 4239var tree = UsingTree(@"T ? a(int a", TestOptions.Script, 4282var tree = UsingTree(@"T ? a(ref int a", TestOptions.Script, 4326var tree = UsingTree(@"T ? a(T a =", TestOptions.Script, 4380var tree = UsingTree(@"T ? a(T[,] a", TestOptions.Script, 4499var tree = UsingTree(@"T ? m(a < b, c > d)", TestOptions.Script, 4555var tree = UsingTree(@"T ? 1", TestOptions.Script, 4596var tree = UsingTree(@"T ? a", TestOptions.Script, 4637var tree = UsingTree(@"T ? a.", TestOptions.Script, 4689var tree = UsingTree(@"T ? a[", TestOptions.Script, 4741var tree = UsingTree(@"T ? a<", TestOptions.Script, 4793var tree = UsingTree(@"T ? a<b", TestOptions.Script, 4842var tree = UsingTree(@"T ? a<b>", TestOptions.Script, 4892var tree = UsingTree(@"T ? a<b,c>", TestOptions.Script, 4947var tree = UsingTree(@"T ? a<b>.", TestOptions.Script, 5008var tree = UsingTree(@"T ? a<b>.c", TestOptions.Script, 5066var tree = UsingTree(@"T ? a<b>.c(", TestOptions.Script, 5135var tree = UsingTree(@"T ? a(", TestOptions.Script, 5187var tree = UsingTree(@"T ? a.b(", TestOptions.Script, 5247var tree = UsingTree(@"T ? m(c", TestOptions.Script, 5306var tree = UsingTree(@"T ? m(c,", TestOptions.Script, 5376var tree = UsingTree(@"T ? m(c:", TestOptions.Script, 5446var tree = UsingTree(@"T ? m(c?", TestOptions.Script, 5527var tree = UsingTree(@"T ? m(c? a", TestOptions.Script, 5605var tree = UsingTree(@"T ? m(c? a =", TestOptions.Script, 5694var tree = UsingTree(@"T ? m(c? a = b ?", TestOptions.Script, 5802var tree = UsingTree(@"T ? m()", TestOptions.Script, 5851var tree = UsingTree(@"T ? m(a)", TestOptions.Script, 5907var tree = UsingTree(@"T ? m();", TestOptions.Script, 5956var tree = UsingTree(@"T ? m(a);", TestOptions.Script, 6012var tree = UsingTree(@"T ? m(x: 1", TestOptions.Script, 6079var tree = UsingTree(@"T ? m(x: 1, y: a ? b : c)", TestOptions.Script, 6172var tree = UsingTree(@"T ? u => { } : v => { }", TestOptions.Script); 6225var tree = UsingTree(@"T ? u => (d ? e => 1 : f => 2)(3) : c => 2", TestOptions.Script); 6325var tree = UsingTree(@"T ? a ?", TestOptions.Script, 6388var tree = UsingTree(@"T ? a =", TestOptions.Script, 6440var tree = UsingTree(@"T ? a = b", TestOptions.Script, 6489var tree = UsingTree(@"T ? a = b : ", TestOptions.Script, 6535var tree = UsingTree(@"T ? m(out c", TestOptions.Script, 6595var tree = UsingTree(@"T ? m(ref c", TestOptions.Script, 6655var tree = UsingTree(@"T ? m(ref out", TestOptions.Script, 6733var tree = UsingTree(@"T ? m(ref out c", TestOptions.Script, 6808var tree = UsingTree(@"T ? m(this", TestOptions.Script, 6867var tree = UsingTree(@"T ? m(this.", TestOptions.Script, 6937var tree = UsingTree(@"T ? m(this<", TestOptions.Script, 7007var tree = UsingTree(@"T ? m(this[", TestOptions.Script, 7077var tree = UsingTree(@"T ? m(this a", TestOptions.Script, 7147var tree = UsingTree(@"T ? m(this(", TestOptions.Script, 7217var tree = UsingTree(@"T ? m(T[", TestOptions.Script, 7287var tree = UsingTree(@"T ? m(T[1", TestOptions.Script, 7364var tree = UsingTree(@"T ? m(T[1]", TestOptions.Script, 7438var tree = UsingTree(@"T ? a(T ? a =", TestOptions.Script, 7527var tree = UsingTree(@"T ? a(T)", TestOptions.Script, 7583var tree = UsingTree(@"T ? a(ref int.MaxValue)", TestOptions.Script, 7648var tree = UsingTree(@"T ? a(ref a,", TestOptions.Script, 7719var tree = UsingTree(@"T ? a(,", TestOptions.Script, 7792var tree = UsingTree(@"T ? a(T ? b[1] : b[2])", TestOptions.Script, 7965var tree = UsingTree(@"T ? m(a < b, c > d) :", TestOptions.Script, 8360var tree = UsingTree(@"from", TestOptions.Script); 8382var tree = UsingTree(@"from c", TestOptions.Script, 9177var tree = UsingTree("a < b,c.", TestOptions.Script, 9609var tree = SyntaxFactory.ParseSyntaxTree(test, options: TestOptions.Script); 9633var tree = ParseAndValidate($"#!{command}", TestOptions.Script); 9644tree = ParseAndValidate($"#! {command}\r\n ", TestOptions.Script); 9660Console.WriteLine(""Hi!"");", TestOptions.Script); 9674ParseAndValidate(" #!/usr/bin/env csi", TestOptions.Script, 9677ParseAndValidate("\n#!/usr/bin/env csi", TestOptions.Script, 9680ParseAndValidate("\r\n#!/usr/bin/env csi", TestOptions.Script, 9683ParseAndValidate("#!/bin/sh\r\n#!/usr/bin/env csi", TestOptions.Script, 9686ParseAndValidate("a #!/usr/bin/env csi", TestOptions.Script, 9693ParseAndValidate("#/usr/bin/env csi", TestOptions.Script, 9700ParseAndValidate("# !/usr/bin/env csi", TestOptions.Script, 9707var tree = ParseAndValidate("//#!/usr/bin/env csi", TestOptions.Script);
Syntax\SyntaxNodeTests.cs (2)
387testContainsHelper2(new[] { SyntaxKind.ShebangDirectiveTrivia }, SyntaxFactory.ParseCompilationUnit("#!command", options: TestOptions.Script)); 388testContainsHelper2(new[] { SyntaxKind.BadDirectiveTrivia }, SyntaxFactory.ParseCompilationUnit(" #!command", options: TestOptions.Script));
Syntax\SyntaxRewriterTests.cs (9)
361var tree = SyntaxFactory.ParseSyntaxTree("System.Console.Write(\"Before\")", TestOptions.Script); 376var tree = SyntaxFactory.ParseSyntaxTree("m(a, b)", TestOptions.Script); 395var tree = SyntaxFactory.ParseSyntaxTree("m(a, b)", TestOptions.Script); 422var tree = SyntaxFactory.ParseSyntaxTree("private class C { }", options: TestOptions.Script); 442var tree = SyntaxFactory.ParseSyntaxTree("public class C { }", options: TestOptions.Script); 465var tree = SyntaxFactory.ParseSyntaxTree("/* c */ identifier", options: TestOptions.Script); 492var tree = SyntaxFactory.ParseSyntaxTree("/* c */ identifier", options: TestOptions.Script); 514var tree = SyntaxFactory.ParseSyntaxTree("private class C { }", options: TestOptions.Script); 527var tree = SyntaxFactory.ParseSyntaxTree("private class C { }", options: TestOptions.Script);
Syntax\SyntaxTests.cs (2)
22Assert.False(SyntaxFactory.IsCompleteSubmission(SyntaxFactory.ParseSyntaxTree(code, options: TestOptions.Script))); 27Assert.True(SyntaxFactory.IsCompleteSubmission(SyntaxFactory.ParseSyntaxTree(code, options: TestOptions.Script)));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CSharpTestBase.cs (2)
1466syntaxTree: Parse(source, options: parseOptions ?? TestOptions.Script), 1489syntaxTree: Parse(code, options: parseOptions ?? TestOptions.Script),