314 references to Platform
Microsoft.CodeAnalysis (27)
Microsoft.CodeAnalysis.CSharp (27)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (17)
CommandLineTests.cs (17)
4332Assert.Equal(Platform.X64, parsedArgs.CompilationOptions.Platform);
4336Assert.Equal(Platform.X86, parsedArgs.CompilationOptions.Platform);
4341Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform);
4345Assert.Equal(Platform.Itanium, parsedArgs.CompilationOptions.Platform);
4349Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform);
4353Assert.Equal(Platform.AnyCpu32BitPreferred, parsedArgs.CompilationOptions.Platform);
4357Assert.Equal(Platform.Arm, parsedArgs.CompilationOptions.Platform);
4363Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default
4369Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default
11478var csc32 = CreateCompilationWithMscorlib46(csc32src, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86), assemblyName: "csc32");
12136var list = new List<Tuple<string, Platform>>()
12138Tuple.Create("x86", Platform.X86),
12139Tuple.Create("x64", Platform.X64),
12140Tuple.Create("itanium", Platform.Itanium),
12141Tuple.Create("anycpu", Platform.AnyCpu),
12142Tuple.Create("anycpu32bitpreferred",Platform.AnyCpu32BitPreferred),
12143Tuple.Create("arm", Platform.Arm)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (86)
Emit\CompilationEmitTests.cs (51)
2034WithPlatform(Platform.Arm64).
3485var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu));
3489compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86));
3493compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64));
3499compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu32BitPreferred));
3505compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.Arm));
3523options: TestOptions.DebugDll.WithPlatform(Platform.X86));
3557options: TestOptions.DebugDll.WithPlatform(Platform.X64));
3607options: TestOptions.DebugDll.WithPlatform(Platform.Arm));
3647options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu));
3688var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64));
3771compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86));
3776compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86));
3781compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86));
3785compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64));
3790compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64));
3795compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64));
4673var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch");
4687parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu));
4693parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu));
4699parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu));
4705parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu));
4711parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86));
4719parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86));
4727parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86));
4735parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86));
4758var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch");
4771parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu));
4779parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86));
4787parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu));
4803var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86), assemblyName: "PlatformMismatch");
4818parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
4826parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
4834parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium));
4842parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium));
4859var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86), assemblyName: "PlatformMismatch");
4873parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
4890var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu), assemblyName: "PlatformMismatch");
4905parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
4911parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
4917parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium));
4923parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium));
4938var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu), assemblyName: "PlatformMismatch");
4952parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
4967var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch");
4982parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
4988parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
4994parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium));
5000parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium));
5015var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch");
5030parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
Emit\DeterministicTests.cs (26)
29private Guid CompiledGuid(string source, string assemblyName, bool debug, Platform platform = Platform.AnyCpu)
34private Guid CompiledGuid(string source, string assemblyName, CSharpCompilationOptions options, EmitOptions emitOptions = null, Platform platform = Platform.AnyCpu)
51private (ImmutableArray<byte> pe, ImmutableArray<byte> pdb) EmitDeterministic(string source, Platform platform, DebugInformationFormat pdbFormat, bool optimize)
131var mvid1 = CompiledGuid(source, "X1", false, Platform.X86);
132var mvid2 = CompiledGuid(source, "X1", false, Platform.X86);
135var mvid3 = CompiledGuid(source, "X1", false, Platform.X64);
136var mvid4 = CompiledGuid(source, "X1", false, Platform.X64);
139var mvid5 = CompiledGuid(source, "X1", false, Platform.Arm64);
140var mvid6 = CompiledGuid(source, "X1", false, Platform.Arm64);
152var result1 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, DebugInformationFormat.Embedded, optimize: false);
153var result2 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, DebugInformationFormat.Embedded, optimize: false);
218var result1 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.AnyCpu32BitPreferred, pdbFormat, optimize: true);
219var result2 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.AnyCpu32BitPreferred, pdbFormat, optimize: true);
223var result3 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, pdbFormat, optimize: true);
224var result4 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, pdbFormat, optimize: true);
228var result5 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, pdbFormat, optimize: true);
229var result6 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, pdbFormat, optimize: true);
245var result1 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.AnyCpu32BitPreferred, pdbFormat, optimize: false);
246var result2 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.AnyCpu32BitPreferred, pdbFormat, optimize: false);
250var result3 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, pdbFormat, optimize: false);
251var result4 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, pdbFormat, optimize: false);
255var result5 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, pdbFormat, optimize: false);
256var result6 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, pdbFormat, optimize: false);
477.WithPlatform(Platform.AnyCpu)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.CSharp.Scripting (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\CSharpCompilationOptionsTests.cs (10)
83TestHiddenProperty((old, value) => old.WithPlatform(value), opt => opt.Platform, Platform.Itanium);
121TestProperty((old, value) => old.WithPlatform(value), opt => opt.Platform, Platform.Itanium);
184new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithPlatform((Platform)Int32.MaxValue).VerifyErrors(
188new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithPlatform((Platform)Int32.MinValue).VerifyErrors(
334new CSharpCompilationOptions(OutputKind.ConsoleApplication, platform: (Platform)Int32.MinValue).VerifyErrors(
345new CSharpCompilationOptions(OutputKind.ConsoleApplication, platform: Platform.AnyCpu32BitPreferred).VerifyErrors();
347new CSharpCompilationOptions(OutputKind.WindowsRuntimeApplication, platform: Platform.AnyCpu32BitPreferred).VerifyErrors();
349new CSharpCompilationOptions(OutputKind.WindowsRuntimeMetadata, platform: Platform.AnyCpu32BitPreferred).VerifyErrors(
352new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, platform: Platform.AnyCpu32BitPreferred).VerifyErrors(
396Platform platform = 0;
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.Rebuild (4)
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic (29)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (9)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (65)
Emit\CompilationEmitTests.vb (46)
2084compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X86))
2088compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X64))
2094compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu32BitPreferred))
2113Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.AnyCpu))
2138compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu))
2174Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.Arm))
2199compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu))
2235Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.X64))
2255compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X64))
2343compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(Platform.X86))
2347compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(Platform.X64))
2351compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseDll.WithPlatform(Platform.X64))
3859Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
3876TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu))
3882TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu))
3888TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu))
3894TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu))
3900TestOptions.ReleaseDll.WithPlatform(Platform.X86))
3909TestOptions.ReleaseDll.WithPlatform(Platform.X86))
3918TestOptions.ReleaseModule.WithPlatform(Platform.X86))
3927TestOptions.ReleaseModule.WithPlatform(Platform.X86))
3951Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.Itanium))
3967TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu))
3976TestOptions.ReleaseDll.WithPlatform(Platform.X86))
3985TestOptions.ReleaseModule.WithPlatform(Platform.X86))
4002Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.X86))
4019TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4028TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4037TestOptions.ReleaseModule.WithPlatform(Platform.Itanium))
4046TestOptions.ReleaseModule.WithPlatform(Platform.Itanium))
4064Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.X86))
4080TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4098Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu))
4115TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4123TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4131TestOptions.ReleaseModule.WithPlatform(Platform.Itanium))
4139TestOptions.ReleaseModule.WithPlatform(Platform.Itanium))
4156Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu))
4172TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4189Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4206TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4214TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
4222TestOptions.ReleaseModule.WithPlatform(Platform.Itanium))
4230TestOptions.ReleaseModule.WithPlatform(Platform.Itanium))
4247Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.Itanium))
4263TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
Emit\DeterministicTests.vb (11)
19Private Function GetBytesEmitted(source As String, platform As Platform, debug As Boolean) As ImmutableArray(Of Byte)
61Dim result1 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=False)
62Dim result2 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=False)
65Dim result3 = GetBytesEmitted(source, platform:=Platform.X64, debug:=False)
66Dim result4 = GetBytesEmitted(source, platform:=Platform.X64, debug:=False)
69Dim result5 = GetBytesEmitted(source, platform:=Platform.Arm64, debug:=False)
70Dim result6 = GetBytesEmitted(source, platform:=Platform.Arm64, debug:=False)
83Dim result1 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=True)
84Dim result2 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=True)
87Dim result3 = GetBytesEmitted(source, platform:=Platform.X64, debug:=True)
88Dim result4 = GetBytesEmitted(source, platform:=Platform.X64, debug:=True)
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Compilation\VisualBasicCompilationOptionsTests.vb (6)
37TestHiddenProperty(Function(old, value) old.WithPlatform(value), Function(opt) opt.Platform, Platform.X64)
112TestProperty(Function(old, value) old.WithPlatform(value), Function(opt) opt.Platform, Platform.X64)
194AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(CType(Int32.MaxValue, Platform)).Errors,
199AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(CType(Int32.MinValue, Platform)).Errors,
297AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, platform:=CType(Int32.MaxValue, Platform)).Errors,
302AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, platform:=CType(Int32.MinValue, Platform)).Errors,
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (10)
VisualStudioMSBuildWorkspaceTests.cs (10)
477Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
492Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
506Assert.Equal(Platform.AnyCpu32BitPreferred, compilation.Options.Platform);
521Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
536Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
601Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
616Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
630Assert.Equal(Platform.AnyCpu32BitPreferred, compilation.Options.Platform);
645Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
660Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
Microsoft.VisualStudio.LanguageServices (7)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Microsoft.VisualStudio.LanguageServices.Implementation (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)