+
Skip to content

Enable unit tests on more platforms #913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ jobs:
path-type: inherit # Inherit the path so that dotnet can be found
update: true
install: >-
mingw-w64-x86_64-meson
mingw-w64-x86_64-cairo
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gdk-pixbuf2
mingw-w64-x86_64-gobject-introspection
mingw-w64-x86_64-meson

- name: Install dependencies (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: brew install meson gobject-introspection
run: brew install cairo gdk-pixbuf gobject-introspection meson

# Note: gobject-introspection is the actual dependency, but
# libgirepository1.0-dev is needed so that meson can find it via pkg-config
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/Cairo-1.0.Tests/ContextTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Cairo.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class ContextTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/Cairo-1.0.Tests/FontFaceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Cairo.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class FontFaceTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/Cairo-1.0.Tests/FontOptionsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Cairo.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class FontOptionsTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/Cairo-1.0.Tests/ImageSurfaceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Cairo.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class ImageSurfaceTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/Cairo-1.0.Tests/MatrixTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Cairo.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class MatrixTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/Cairo-1.0.Tests/PatternTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Cairo.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class PatternTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/Cairo-1.0.Tests/ScaledFontTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Cairo.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class ScaledFontTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GLib-2.0.Tests/FunctionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GLib.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class FunctionTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GLib-2.0.Tests/Records/DirTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GLib.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class DirTest
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GLib-2.0.Tests/Records/ExceptionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace GLib.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class ExceptionTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GLib-2.0.Tests/Records/UnownedHandleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GLib.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class MemoryManagementTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GLib-2.0.Tests/Records/VariantTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GLib.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class VariantTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GLib-2.0.Tests/Records/VariantTypeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GLib.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class VariantTypeTest : Test
{
[DataTestMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace GLib.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class SynchronizationContextTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GObject-2.0.Tests/Classes/ParamSpecTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GObject.Tests.Classes;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class ParamSpecTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GObject-2.0.Tests/Records/TypeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GObject.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class TypeTest
{
[TestMethod]
Expand Down
7 changes: 6 additions & 1 deletion src/Tests/Libs/GObject-2.0.Tests/Records/ValueTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace GObject.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class ValueTest : Test
{
[DataTestMethod]
Expand Down Expand Up @@ -49,6 +49,11 @@ public void ValueContainsExpectedBasicType(object data, Internal.BasicType basic
[TestMethod]
public void DisposeShouldFreeUnmanagedMemory()
{
// This test relies on the memory being zeroed out after it is freed, which is not guaranteed.
// This does not happen on Windows, but seems reliable on other platforms.
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Assert.Inconclusive();

var value = 1;
var v = Value.From(value);
var ptr = v.Handle.DangerousGetHandle();
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GdkPixbuf-2.0.Tests/MemoryManagementTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace GdkPixbuf.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class MemoryManagementTest : Test
{
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Libs/GdkPixbuf-2.0.Tests/PropertyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace GdkPixbuf.Tests;

[TestClass, TestCategory("IntegrationTest")]
[TestClass, TestCategory("UnitTest")]
public class PropertyTest : Test
{
[TestMethod]
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载