33 references to WithUsings
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\InteractiveUsingTests.cs (8)
53
options: TestOptions.DebugDll.
WithUsings
("System", "System.IO.Path"));
66
options: TestOptions.DebugDll.
WithUsings
("System.Text"));
159
var options = TestOptions.DebugDll.
WithUsings
("System");
268
var options = TestOptions.DebugDll.
WithUsings
("System");
292
CreateSubmission("typeof(String)", options: TestOptions.DebugDll.
WithUsings
("System", "System")).VerifyDiagnostics();
298
var options = TestOptions.DebugDll.
WithUsings
("System");
325
var options = TestOptions.DebugDll.
WithUsings
("B");
486
options: TestOptions.DebugDll.WithSourceReferenceResolver(resolver).
WithUsings
("System.IO", "System.IO.Path"));
Semantics\ScriptSemanticsTests.cs (3)
142
options: TestOptions.DebugExe.
WithUsings
("Hidden"),
162
options: TestOptions.DebugExe.
WithUsings
("Hidden"),
210
options: TestOptions.DebugExe.
WithUsings
("Hidden"),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (21)
Compilation\CSharpCompilationOptionsTests.cs (8)
203
var actual1 = new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithUsings
(new[] { "A", "B" }).Usings;
209
Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithUsings
("A", "B").
WithUsings
(null).Usings.Count());
210
Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithUsings
("A", "B").
WithUsings
((string[])null).Usings.Count());
212
new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithUsings
(new string[] { null }).VerifyErrors(
216
new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithUsings
(new string[] { "" }).VerifyErrors(
220
new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithUsings
(new string[] { "blah\0goo" }).VerifyErrors(
Compilation\UsedAssembliesTests.cs (9)
2339
AssertUsedAssemblyReferences(CreateCompilation(Parse(source, options: TestOptions.Script), references: new[] { reference }, options: TestOptions.DebugDll.
WithUsings
(@using)),
4013
options: TestOptions.DebugDll.
WithUsings
("C0")),
4017
options: TestOptions.DebugDll.
WithUsings
("C0")),
4608
options: TestOptions.DebugDll.
WithUsings
("N1.N2")),
4612
options: TestOptions.DebugDll.
WithUsings
("N1.N2")),
4616
options: TestOptions.DebugDll.
WithUsings
("N1")),
4620
options: TestOptions.DebugDll.
WithUsings
("N1")),
4799
options: TestOptions.DebugDll.
WithUsings
("N1.N2.E0")),
4803
options: TestOptions.DebugDll.
WithUsings
("N1.N2.E0")),
Symbols\CompilationCreationTests.cs (1)
2843
options: TestOptions.ReleaseDll.
WithUsings
("System.Console!", "Blah"));
Symbols\Source\FileModifierTests.cs (1)
3325
var compilation = CreateCompilation(new[] { (source, "file1.cs"), (IsExternalInitTypeDefinition, "file2.cs") }, options: TestOptions.DebugExe.
WithUsings
("NS"));
Symbols\TypeTests.cs (2)
818
TestOptions.ReleaseDll.
WithUsings
("System.Console"));
831
TestOptions.ReleaseDll.
WithUsings
("System.Console").WithTopLevelBinderFlags(BinderFlags.IgnoreCorLibraryDuplicatedTypes));
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
CSharpDeterministicKeyBuilderTests.cs (1)
315
var options = Options.
WithUsings
(usings);