Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancheung committed Apr 14, 2024
1 parent 48eb33f commit f4729a1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net8.0-android</TargetFramework>
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
10 changes: 5 additions & 5 deletions FreeTypeSharp.Android.Test/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
using Android.Runtime;
using Android.Widget;
using System;
using FreeTypeSharp;
using static FreeTypeSharp.Native.FT;
using static FreeTypeSharp.FT;

namespace FreeTypeSharp.Android.Test
{
[Activity(Label = "@string/app_name", MainLauncher = true)]
public class MainActivity : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
protected unsafe override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);

// Set our view from the "main" layout resource
SetContentView(Resource.Layout.activity_main);

var textView1 = FindViewById<TextView>(Resource.Id.textView1);
var textView1 = FindViewById<TextView>(Resource.Id.textView1);

var library = new FreeTypeLibrary();
FT_Library_Version(library.Native, out var major, out var minor, out var patch);
int major, minor, patch;
FT_Library_Version(library.Native, &major, &minor, &patch);
textView1.Text = $"FreeType version: {major}.{minor}.{patch}";
}
}
Expand Down
1 change: 1 addition & 0 deletions FreeTypeSharp.Core.Test/FreeTypeSharp.Core.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions FreeTypeSharp.Core.Test/Program.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
using System;
using static FreeTypeSharp.Native.FT;
using static FreeTypeSharp.FT;

namespace FreeTypeSharp.Core.Test
{
class Program
{
static void Main(string[] args)
unsafe static void Main(string[] args)
{
var library = new FreeTypeLibrary();
FT_Library_Version(library.Native, out var major, out var minor, out var patch);
int major, minor, patch;
FT_Library_Version(library.Native, &major, &minor, &patch);
Console.WriteLine($"FreeType version: {major}.{minor}.{patch}");
}
}
Expand Down
2 changes: 1 addition & 1 deletion FreeTypeSharp/FreeTypeLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void Dispose()
}

/// <inheritdoc/>
void Dispose(Boolean disposing)
void Dispose(bool disposing)
{
if (Native != default)
{
Expand Down

0 comments on commit f4729a1

Please sign in to comment.