29 references to WithPreprocessorSymbols
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenLocalFunctionTests.cs (4)
5524parseOptions: TestOptions.Regular9.WithPreprocessorSymbols("DEBUG"), 5567CreateCompilation(source, parseOptions: TestOptions.Regular9.WithPreprocessorSymbols("DEBUG")).VerifyDiagnostics(); 5595CreateCompilation(source, parseOptions: TestOptions.Regular9.WithPreprocessorSymbols("DEBUG")).VerifyDiagnostics(); 5622parseOptions: TestOptions.Regular9.WithPreprocessorSymbols("DEBUG"),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (9)
Diagnostics\GetDiagnosticsTests.cs (6)
385var compilation = CreateEmptyCompilation(string.Empty, parseOptions: new CSharpParseOptions().WithPreprocessorSymbols(new[] { "1" })); 429var syntaxTree1 = Parse(string.Empty, options: new CSharpParseOptions().WithPreprocessorSymbols(new[] { "1" })); 430var syntaxTree2 = Parse(string.Empty, options: new CSharpParseOptions().WithPreprocessorSymbols(new[] { "2" })); 431var syntaxTree3 = Parse(string.Empty, options: new CSharpParseOptions().WithPreprocessorSymbols(new[] { "3" })); 455var parseOptions1 = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "1" }); 456var parseOptions2 = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "2" });
FieldKeywordTests.cs (1)
8030parseOptions = parseOptions.WithPreprocessorSymbols("DEBUG");
Semantics\CollectionExpressionTests.cs (2)
9320CompileAndVerify(new[] { source, s_collectionExtensions }, parseOptions: parseOptions.WithPreprocessorSymbols("DEBUG"), expectedOutput: "[1, 2, 3], "); 9351CompileAndVerify(new[] { source, s_collectionExtensions }, parseOptions: parseOptions.WithPreprocessorSymbols("DEBUG"), expectedOutput: "[1, 2, 3], ");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ConditionalOperatorTests.cs (1)
1501parseOptions: CSharpParseOptions.Default.WithPreprocessorSymbols("DEBUG"));
Semantics\LocalFunctionTests.cs (1)
5946var comp = CreateCompilation(source, parseOptions: TestOptions.Regular.WithPreprocessorSymbols("MyDefine"));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Parsing\CSharpParseOptionsTests.cs (6)
51Assert.Equal(0, CSharpParseOptions.Default.WithPreprocessorSymbols(ImmutableArray.Create<string>("A", "B")).WithPreprocessorSymbols((string[])null).PreprocessorSymbols.Length); 225var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "" }); 235var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { " " }); 245var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "Good", "Bad.Symbol" }); 255var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "Good", "Bad\\Symbol" }); 265var options = new CSharpParseOptions().WithPreprocessorSymbols(new[] { "Good", null });
Parsing\LineSpanDirectiveParsingTests.cs (1)
46UsingLineDirective(source, TestOptions.Regular9.WithPreprocessorSymbols("IsActive"));
Syntax\FieldAndValueKeywordTests.cs (1)
1309parseOptions = parseOptions.WithPreprocessorSymbols("DEBUG");
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CSharpDeterministicKeyBuilderTests.cs (1)
358var parseOptions = CSharpParseOptions.Default.WithPreprocessorSymbols(values);
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
SolutionTests\SolutionTests.cs (5)
589var parseOptions1 = CSharpParseOptions.Default.WithPreprocessorSymbols("UNIQUE_NAME"); 681""", CSharpParseOptions.Default.WithPreprocessorSymbols("UNIQUE_NAME"), CSharpParseOptions.Default); 4417currentSolution = currentSolution.WithProjectParseOptions(document1.Project.Id, options.WithPreprocessorSymbols("X")); 5805.WithParseOptions(CSharpParseOptions.Default.WithPreprocessorSymbols("DEBUG")) 5815.WithParseOptions(CSharpParseOptions.Default.WithPreprocessorSymbols("RELEASE"))