Skip to content
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
30 changes: 30 additions & 0 deletions tests/ShimSkiaSharp.UnitTests/SKPoint3Tests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Xunit;
using ShimSkiaSharp;

namespace ShimSkiaSharp.UnitTests;

public class SKPoint3Tests
{
[Fact]
public void Empty_IsEmpty()
{
Assert.True(SKPoint3.Empty.IsEmpty);
}

[Fact]
public void Constructor_SetsProperties()
{
var p = new SKPoint3(1f, 2f, 3f);
Assert.Equal(1f, p.X);
Assert.Equal(2f, p.Y);
Assert.Equal(3f, p.Z);
Assert.False(p.IsEmpty);
}

[Fact]
public void ToString_ReturnsValues()
{
var p = new SKPoint3(4f, 5f, 6f);
Assert.Equal("4, 5, 6", p.ToString());
}
}
29 changes: 29 additions & 0 deletions tests/ShimSkiaSharp.UnitTests/SKPointITests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Xunit;
using ShimSkiaSharp;

namespace ShimSkiaSharp.UnitTests;

public class SKPointITests
{
[Fact]
public void Empty_IsEmpty()
{
Assert.True(SKPointI.Empty.IsEmpty);
}

[Fact]
public void Constructor_SetsProperties()
{
var p = new SKPointI(7, 8);
Assert.Equal(7, p.X);
Assert.Equal(8, p.Y);
Assert.False(p.IsEmpty);
}

[Fact]
public void ToString_ReturnsValues()
{
var p = new SKPointI(1, 2);
Assert.Equal("1, 2", p.ToString());
}
}
29 changes: 29 additions & 0 deletions tests/ShimSkiaSharp.UnitTests/SKPointTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Xunit;
using ShimSkiaSharp;

namespace ShimSkiaSharp.UnitTests;

public class SKPointTests
{
[Fact]
public void Empty_IsEmpty()
{
Assert.True(SKPoint.Empty.IsEmpty);
}

[Fact]
public void Constructor_SetsProperties()
{
var p = new SKPoint(3.5f, 4.5f);
Assert.Equal(3.5f, p.X);
Assert.Equal(4.5f, p.Y);
Assert.False(p.IsEmpty);
}

[Fact]
public void ToString_ReturnsValues()
{
var p = new SKPoint(1f, 2f);
Assert.Equal("1, 2", p.ToString());
}
}
29 changes: 29 additions & 0 deletions tests/ShimSkiaSharp.UnitTests/SKSizeITests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Xunit;
using ShimSkiaSharp;

namespace ShimSkiaSharp.UnitTests;

public class SKSizeITests
{
[Fact]
public void Empty_IsEmpty()
{
Assert.True(SKSizeI.Empty.IsEmpty);
}

[Fact]
public void Constructor_SetsProperties()
{
var s = new SKSizeI(9, 10);
Assert.Equal(9, s.Width);
Assert.Equal(10, s.Height);
Assert.False(s.IsEmpty);
}

[Fact]
public void ToString_ReturnsValues()
{
var s = new SKSizeI(3, 4);
Assert.Equal("3, 4", s.ToString());
}
}
29 changes: 29 additions & 0 deletions tests/ShimSkiaSharp.UnitTests/SKSizeTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Xunit;
using ShimSkiaSharp;

namespace ShimSkiaSharp.UnitTests;

public class SKSizeTests
{
[Fact]
public void Empty_IsEmpty()
{
Assert.True(SKSize.Empty.IsEmpty);
}

[Fact]
public void Constructor_SetsProperties()
{
var s = new SKSize(5.5f, 6.5f);
Assert.Equal(5.5f, s.Width);
Assert.Equal(6.5f, s.Height);
Assert.False(s.IsEmpty);
}

[Fact]
public void ToString_ReturnsValues()
{
var s = new SKSize(2f, 3f);
Assert.Equal("2, 3", s.ToString());
}
}
Loading