File tree 3 files changed +49
-4
lines changed
tests/FunctionalTests/iOS/Simulator/InvariantCultureOnlyMode
3 files changed +49
-4
lines changed Original file line number Diff line number Diff line change @@ -120,21 +120,21 @@ public string GenerateXCode(
120
120
var defines = new StringBuilder ( ) ;
121
121
if ( forceInterpreter )
122
122
{
123
- defines . Append ( "add_definitions(-DFORCE_INTERPRETER=1)" ) ;
123
+ defines . AppendLine ( "add_definitions(-DFORCE_INTERPRETER=1)" ) ;
124
124
}
125
125
else if ( forceAOT )
126
126
{
127
- defines . Append ( "add_definitions(-DFORCE_AOT=1)" ) ;
127
+ defines . AppendLine ( "add_definitions(-DFORCE_AOT=1)" ) ;
128
128
}
129
129
130
130
if ( invariantGlobalization )
131
131
{
132
- defines . Append ( "add_definitions(-DINVARIANT_GLOBALIZATION=1)" ) ;
132
+ defines . AppendLine ( "add_definitions(-DINVARIANT_GLOBALIZATION=1)" ) ;
133
133
}
134
134
135
135
if ( EnableRuntimeLogging )
136
136
{
137
- defines . Append ( "add_definitions(-DENABLE_RUNTIME_LOGGING=1)" ) ;
137
+ defines . AppendLine ( "add_definitions(-DENABLE_RUNTIME_LOGGING=1)" ) ;
138
138
}
139
139
140
140
cmakeLists = cmakeLists . Replace ( "%Defines%" , defines . ToString ( ) ) ;
Original file line number Diff line number Diff line change
1
+ // Licensed to the .NET Foundation under one or more agreements.
2
+ // The .NET Foundation licenses this file to you under the MIT license.
3
+
4
+ using System ;
5
+ using System . Globalization ;
6
+ using System . Threading ;
7
+ using System . Threading . Tasks ;
8
+ using System . Runtime . InteropServices ;
9
+
10
+ public static class Program
11
+ {
12
+ [ DllImport ( "__Internal" ) ]
13
+ public static extern void mono_ios_set_summary ( string value ) ;
14
+
15
+ public static async Task < int > Main ( string [ ] args )
16
+ {
17
+ mono_ios_set_summary ( $ "Starting functional test") ;
18
+
19
+ var culture = new CultureInfo ( "es-ES" , false ) ;
20
+ // https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md#cultures-and-culture-data
21
+ int result = culture . LCID == 0x1000 && culture . NativeName == "Invariant Language (Invariant Country)" ? 42 : 1 ;
22
+
23
+ Console . WriteLine ( "Done!" ) ;
24
+ await Task . Delay ( 5000 ) ;
25
+
26
+ return result ;
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
+ <PropertyGroup >
3
+ <OutputType >Exe</OutputType >
4
+ <MonoForceInterpreter >true</MonoForceInterpreter >
5
+ <RunAOTCompilation >false</RunAOTCompilation >
6
+ <InvariantGlobalization >true</InvariantGlobalization >
7
+ <TestRuntime >true</TestRuntime >
8
+ <TargetFrameworks >$(NetCoreAppCurrent)</TargetFrameworks >
9
+ <MainLibraryFileName >iOS.Simulator.InvariantCultureOnlyMode.Test.dll</MainLibraryFileName >
10
+ <IncludesTestRunner >false</IncludesTestRunner >
11
+ <ExpectedExitCode >42</ExpectedExitCode >
12
+ </PropertyGroup >
13
+
14
+ <ItemGroup >
15
+ <Compile Include =" Program.cs" />
16
+ </ItemGroup >
17
+ </Project >
You can’t perform that action at this time.
0 commit comments