diff --git a/src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs b/src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs index 496119d1d25983..5edfa31e1b9f67 100644 --- a/src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs @@ -452,6 +452,8 @@ public unsafe static int Main() { ((delegate* unmanaged)&A.Conflict.C)(); ((delegate* unmanaged)&B.Conflict.C)(); + ((delegate* unmanaged)&A.Conflict.C\U0001F412)(); + ((delegate* unmanaged)&B.Conflict.C\U0001F412)(); return 42; } } @@ -462,6 +464,11 @@ public class Conflict { public static void C() { Console.WriteLine("A.Conflict.C"); } + + [UnmanagedCallersOnly(EntryPoint = "A_Conflict_C\U0001F412")] + public static void C\U0001F412() { + Console.WriteLine("A.Conflict.C\U0001F412"); + } } } @@ -471,6 +478,11 @@ public class Conflict { public static void C() { Console.WriteLine("B.Conflict.C"); } + + [UnmanagedCallersOnly(EntryPoint = "B_Conflict_C\U0001F412")] + public static void C\U0001F412() { + Console.WriteLine("B.Conflict.C\U0001F412"); + } } } """; @@ -486,6 +498,8 @@ public static void C() { output = RunAndTestWasmApp(buildArgs, buildDir: _projectDir, expectedExitCode: 42, host: host, id: id); Assert.Contains("A.Conflict.C", output); Assert.Contains("B.Conflict.C", output); + Assert.Contains("A.Conflict.C\U0001F412", output); + Assert.Contains("B.Conflict.C\U0001F412", output); } [Theory]