Skip to content

Commit

Permalink
ci: Adjust net7-specific bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Sep 29, 2022
1 parent 3bd05d0 commit 9d49c17
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<Project Sdk="MSBuild.Sdk.Extras" ToolsVersion="15.0">
<PropertyGroup>
<PropertyGroup Condition="'$(MSBuildRuntimeType)'!='Core'">
<TargetFrameworks>xamarinmac20;xamarinios10;MonoAndroid12.0;net461;netstandard2.0</TargetFrameworks>
<TargetFrameworksCI>MonoAndroid11.0;MonoAndroid12.0;xamarinios10;net461;netstandard2.0;xamarinmac20</TargetFrameworksCI>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildRuntimeType)'=='Core'">
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(UnoTargetFrameworkOverride)'!=''">
<TargetFrameworks>$(UnoTargetFrameworkOverride)</TargetFrameworks>
</PropertyGroup>
Expand Down
7 changes: 6 additions & 1 deletion src/Uno.UI.Wasm.Tests/Tests/TSBindingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace SamplesApp.UnitTests.TSBindings

public class TSBindingsTests
{
#if NET7_0_OR_GREATER
[TestMethod]
public void When_TestPerf()
{
Expand All @@ -26,6 +27,7 @@ public void When_TestPerf()
{
string r = TestImport.When_SingleStringNet7(i.ToString());
}

Console.WriteLine($"net7 interop: {sw1.Elapsed}");

var sw2 = Stopwatch.StartNew();
Expand All @@ -39,9 +41,10 @@ public void When_TestPerf()
var ret = (GenericReturn)TSInteropMarshaller.InvokeJS("TSBindingsUnitTests:When_SingleString", param, typeof(GenericReturn));

}
Console.WriteLine($"uno ts interop: {sw2.Elapsed}");

Console.WriteLine($"uno ts interop: {sw2.Elapsed}");
}
#endif

[TestMethod]
public void When_IntPtr()
Expand Down Expand Up @@ -193,11 +196,13 @@ public void When_ArrayOfNullStrings()
}
}

#if NET7_0_OR_GREATER
partial class TestImport
{
[JSImport("globalThis.TSBindingsTests.When_SingleStringNet7")]
internal static partial string When_SingleStringNet7(string value);
}
#endif

[TSInteropMessage]
[StructLayout(LayoutKind.Sequential, Pack = 4)]
Expand Down

0 comments on commit 9d49c17

Please sign in to comment.