Some tests need to be skipped on CI without a GL

This commit is contained in:
Matthew Leibowitz 2017-12-14 03:19:59 +02:00
Родитель 8c4087a226
Коммит f03118d336
28 изменённых файлов: 128 добавлений и 127 удалений

Просмотреть файл

@ -86,6 +86,7 @@
<ItemGroup>
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Xunit.SkippableFact" Version="1.3.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\binding\HarfBuzzSharp.Desktop\HarfBuzzSharp.Desktop.csproj">

Просмотреть файл

@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="NUnit" Version="3.6.1" />
<PackageReference Include="Xunit.SkippableFact" Version="1.3.3" />
<PackageReference Include="SkiaSharp" Version="1.60.0" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="1.60.0-beta" />
</ItemGroup>

Просмотреть файл

@ -6,7 +6,7 @@ namespace SkiaSharp.Tests
{
public class GRContextTest : SKTest
{
[Fact]
[SkippableFact]
public void CreateDefaultContextIsValid()
{
using (var ctx = CreateGlContext()) {
@ -18,7 +18,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void CreateSpecificContextIsValid()
{
using (var ctx = CreateGlContext()) {
@ -34,7 +34,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void GpuSurfaceIsCreated()
{
using (var ctx = CreateGlContext()) {

Просмотреть файл

@ -7,7 +7,7 @@ namespace SkiaSharp.Tests
{
public class GRGlInterfaceTest : SKTest
{
[Fact]
[SkippableFact]
public void CreateDefaultInterfaceIsValid()
{
using (var ctx = CreateGlContext()) {
@ -20,7 +20,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void AssembleInterfaceIsValid()
{
using (var ctx = CreateGlContext()) {

Просмотреть файл

@ -18,7 +18,7 @@ namespace SkiaSharp.Tests
return api;
}
[Fact]
[SkippableFact]
public void ApiTypesAreNotInvalid()
{
var ass = typeof(SKImageInfo).GetTypeInfo().Assembly;
@ -46,7 +46,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void ApiReturnTypesArePrimitives()
{
var api = GetApi();
@ -60,7 +60,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void ApiTypesAreMarshalledCorrectly()
{
var api = GetApi();

Просмотреть файл

@ -10,7 +10,7 @@ namespace SkiaSharp.Tests
private const float EPSILON = 0.0001f;
private const int PRECISION = 4;
[Fact]
[SkippableFact]
public void ImageInfoMethodsDoNotModifySource()
{
var info = new SKImageInfo(100, 30, SKColorType.Rgb565, SKAlphaType.Unpremul);
@ -23,7 +23,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKColorType.Index8, copy.ColorType);
}
[Fact]
[SkippableFact]
public void RectangleHasCorrectProperties()
{
var rect = new SKRect(15, 25, 55, 75);
@ -40,7 +40,7 @@ namespace SkiaSharp.Tests
Assert.Equal(50f, rect.MidY);
}
[Fact]
[SkippableFact]
public void RectangleOffsetsCorrectly()
{
var expected = new SKRect(25, 30, 65, 80);
@ -55,7 +55,7 @@ namespace SkiaSharp.Tests
Assert.Equal(expected, rect2);
}
[Fact]
[SkippableFact]
public void RectangleInflatesCorrectly()
{
var rect = new SKRect(15, 25, 55, 75);
@ -73,7 +73,7 @@ namespace SkiaSharp.Tests
Assert.Equal(95f, rect.Bottom);
}
[Fact]
[SkippableFact]
public void RectangleStandardizeCorrectly()
{
var rect = new SKRect(5, 5, 15, 15);
@ -98,7 +98,7 @@ namespace SkiaSharp.Tests
Assert.Equal(rect, negWH.Standardized);
}
[Fact]
[SkippableFact]
public void RectangleAspectFitIsCorrect()
{
var bigRect = SKRect.Create(5, 5, 20, 20);
@ -118,7 +118,7 @@ namespace SkiaSharp.Tests
Assert.Equal(10, fitWide.Height);
}
[Fact]
[SkippableFact]
public void RectangleAspectFillIsCorrect()
{
var bigRect = SKRect.Create(5, 5, 20, 20);
@ -138,7 +138,7 @@ namespace SkiaSharp.Tests
Assert.Equal(20, fitWide.Height);
}
[Fact]
[SkippableFact]
public void SKRectICeilingWorksAsExpected()
{
Assert.Equal(new SKRectI(6, 6, 21, 21), SKRectI.Ceiling(new SKRect(5.5f, 5.5f, 20.5f, 20.5f)));
@ -149,7 +149,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new SKRectI(21, 21, 5, 5), SKRectI.Ceiling(new SKRect(20.4f, 20.6f, 5.4f, 5.6f), true));
}
[Fact]
[SkippableFact]
public void SKRectIFloorWorksAsExpected()
{
Assert.Equal(new SKRectI(5, 5, 20, 20), SKRectI.Floor(new SKRect(5.5f, 5.5f, 20.5f, 20.5f)));
@ -160,7 +160,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new SKRectI(20, 20, 6, 6), SKRectI.Floor(new SKRect(20.4f, 20.6f, 5.4f, 5.6f), true));
}
[Fact]
[SkippableFact]
public void SKRectIRoundWorksAsExpected()
{
Assert.Equal(new SKRectI(6, 6, 21, 21), SKRectI.Round(new SKRect(5.51f, 5.51f, 20.51f, 20.51f)));

Просмотреть файл

@ -9,7 +9,7 @@ namespace SkiaSharp.Tests
{
public class SKBitmapTest : SKTest
{
[Fact]
[SkippableFact]
public void BitmapCanCopyIsCorrect()
{
var bmp = CreateTestBitmap();
@ -25,7 +25,7 @@ namespace SkiaSharp.Tests
Assert.False(bmp.CanCopyTo(SKColorType.Gray8));
}
[Fact]
[SkippableFact]
public void BitmapCopyToAlpha8PreservesData()
{
var bmp = CreateTestBitmap();
@ -47,7 +47,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKColorType.Alpha8, alpha8.ColorType);
}
[Fact]
[SkippableFact]
public void BitmapCopyToArgb4444PreservesData()
{
var bmp = CreateTestBitmap();
@ -69,7 +69,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKColorType.Argb4444, argb4444.ColorType);
}
[Fact]
[SkippableFact]
public void BitmapCopyToRgb565PreservesData()
{
var bmp = CreateTestBitmap();
@ -91,7 +91,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKColorType.Rgb565, rgb565.ColorType);
}
[Fact]
[SkippableFact]
public void BitmapCopyToRgbaF16PreservesData()
{
var bmp = CreateTestBitmap();
@ -113,7 +113,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKColorType.RgbaF16, rgbaF16.ColorType);
}
[Fact]
[SkippableFact]
public void BitmapCopyToInvalidIsNull()
{
var bmp = CreateTestBitmap();
@ -142,7 +142,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKColors.Yellow, bmp.GetPixel(30, 30));
}
[Fact]
[SkippableFact]
public void ReleaseBitmapPixelsWasInvoked()
{
bool released = false;
@ -163,7 +163,7 @@ namespace SkiaSharp.Tests
Assert.True(released, "The SKBitmapReleaseDelegate was not called.");
}
[Fact]
[SkippableFact]
public void ImageCreateDoesNotThrow()
{
var info = new SKImageInfo(1, 1);
@ -173,7 +173,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void ReleaseImagePixelsWasInvoked()
{
bool released = false;
@ -199,7 +199,7 @@ namespace SkiaSharp.Tests
Assert.True(released, "The SKImageRasterReleaseDelegate was not called.");
}
[Fact]
[SkippableFact]
public void ReleaseBitmapPixelsWithNullDelegate()
{
var info = new SKImageInfo(1, 1);
@ -212,7 +212,7 @@ namespace SkiaSharp.Tests
Marshal.FreeCoTaskMem(pixels);
}
[Fact]
[SkippableFact]
public void TestExtractAlpha()
{
var path = Path.Combine(PathToImages, "color-wheel.png");
@ -230,7 +230,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new SKPointI(-7, -7), offset);
}
[Fact]
[SkippableFact]
public void TestBitmapDecodeDrawsCorrectly()
{
var path = Path.Combine(PathToImages, "color-wheel.png");
@ -251,7 +251,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void BitmapAndPixmapAreValid()
{
var info = new SKImageInfo(10, 10);
@ -271,7 +271,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void BitmapResizes()
{
var srcInfo = new SKImageInfo(200, 200);
@ -295,7 +295,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKColors.Blue, dstBmp.GetPixel(75, 75));
}
[Fact]
[SkippableFact]
public void AlphaMaskIsApplied()
{
var srcInfo = new SKImageInfo(4, 4);
@ -388,7 +388,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void SwizzleRedBlueTest()
{
var info = new SKImageInfo(1, 1);

Просмотреть файл

@ -7,7 +7,7 @@ namespace SkiaSharp.Tests
{
public class SKCanvasTest : SKTest
{
[Fact]
[SkippableFact]
public void CanvasCanRestoreOnGpu()
{
using (var ctx = CreateGlContext()) {

Просмотреть файл

@ -7,13 +7,13 @@ namespace SkiaSharp.Tests
{
public class SKCodecTest : SKTest
{
[Fact]
[SkippableFact]
public void MinBufferedBytesNeededHasAValue ()
{
Assert.True (SKCodec.MinBufferedBytesNeeded > 0);
}
[Fact]
[SkippableFact]
public void CanCreateStreamCodec ()
{
var stream = new SKFileStream (Path.Combine (PathToImages, "color-wheel.png"));
@ -26,7 +26,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void GetGifFrames ()
{
const int FrameCount = 16;
@ -67,7 +67,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void GetEncodedInfo ()
{
var stream = new SKFileStream (Path.Combine (PathToImages, "color-wheel.png"));
@ -78,7 +78,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void CanGetPixels ()
{
var stream = new SKFileStream (Path.Combine (PathToImages, "baboon.png"));
@ -88,7 +88,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void DecodeImageScanlines ()
{
var path = Path.Combine (PathToImages, "CMYK.jpg");
@ -134,7 +134,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void DecodePartialImage ()
{
// read the data here, so we can fake a throttle/download
@ -187,7 +187,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void BitmapDecodesCorrectly ()
{
byte[] codecPixels;
@ -204,7 +204,7 @@ namespace SkiaSharp.Tests
Assert.Equal (codecPixels, bitmapPixels);
}
[Fact]
[SkippableFact]
public void BitmapDecodesCorrectlyWithManagedStream ()
{
byte[] codecPixels;

Просмотреть файл

@ -7,7 +7,7 @@ namespace SkiaSharp.Tests
{
public class SKColorSpaceTest : SKTest
{
[Fact]
[SkippableFact]
public void CanCreateSrgb()
{
var colorspace = SKColorSpace.CreateSrgb();
@ -16,7 +16,7 @@ namespace SkiaSharp.Tests
Assert.True(SKColorSpace.Equal(colorspace, colorspace));
}
[Fact]
[SkippableFact]
public void ImageInfoHasColorSpace()
{
var colorspace = SKColorSpace.CreateSrgb();
@ -28,7 +28,7 @@ namespace SkiaSharp.Tests
Assert.Equal(colorspace, image.PeekPixels().ColorSpace);
}
[Fact]
[SkippableFact]
public void SrgbColorSpaceIsCloseToSrgb()
{
var colorspace = SKColorSpace.CreateSrgb();

Просмотреть файл

@ -28,7 +28,7 @@ namespace SkiaSharp.Tests
(SKPMColor)SKColors.Blue
};
[Fact]
[SkippableFact]
public void CreateIndex8Bitmap()
{
var info = new SKImageInfo(320, 240, SKColorType.Index8, SKAlphaType.Opaque);
@ -38,7 +38,7 @@ namespace SkiaSharp.Tests
Assert.Equal(ct, bitmap.ColorTable);
}
[Fact]
[SkippableFact]
public void MembersRetrieveSingleColorWithAlpha()
{
var c = (SKColor)0x33008200;
@ -57,7 +57,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new SKPMColor(0x33001A00), ct[0]);
}
[Fact]
[SkippableFact]
public void MembersRetrieveColors()
{
var colorTable = new SKColorTable(Colors);
@ -75,7 +75,7 @@ namespace SkiaSharp.Tests
Assert.Equal(PMColors[5], colorTable[5]);
}
[Fact]
[SkippableFact]
public void IndexerOutOfRangeBelow()
{
var colorTable = new SKColorTable(Colors);
@ -86,7 +86,7 @@ namespace SkiaSharp.Tests
});
}
[Fact]
[SkippableFact]
public void IndexerOutOfRangeAbove()
{
var colorTable = new SKColorTable(Colors);
@ -97,7 +97,7 @@ namespace SkiaSharp.Tests
});
}
[Fact]
[SkippableFact]
public void Index8ImageHasColorTable()
{
var path = Path.Combine(PathToImages, "index8.png");
@ -139,7 +139,7 @@ namespace SkiaSharp.Tests
Assert.Equal((SKColor)0x7EA4C639, bitmap.GetPixel(182, 348));
}
[Fact]
[SkippableFact]
public void Index8ImageCanChangeColorTable()
{
var path = Path.Combine(PathToImages, "index8.png");

Просмотреть файл

@ -11,7 +11,7 @@ namespace SkiaSharp.Tests
{
private const int Precision = 2;
[Fact]
[SkippableFact]
public void ColorWithComponent()
{
var color = new SKColor();
@ -45,7 +45,7 @@ namespace SkiaSharp.Tests
Assert.Equal(255, alpha.Alpha);
}
[Fact]
[SkippableFact]
public void ColorRgbToHsl()
{
var tuples = new List<ToOtherColor> {
@ -83,7 +83,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void ColorRgbToHsv()
{
var tuples = new List<ToOtherColor> {
@ -121,7 +121,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void HexToColor()
{
var tuples = new List<Tuple<string, SKColor>> {
@ -155,7 +155,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void InvalidHexToColor()
{
var tuples = new List<string> {
@ -177,7 +177,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void PremultipliedColorsHaveCorrectBitShift()
{
var color = (SKColor)0x12345678;

Просмотреть файл

@ -9,7 +9,7 @@ namespace SkiaSharp.Tests
{
private readonly static byte[] OddData = new byte[] { 1, 3, 5, 7, 9 };
[Fact]
[SkippableFact]
public void ValidDataProperties()
{
var data = SKData.CreateCopy(OddData);
@ -18,7 +18,7 @@ namespace SkiaSharp.Tests
Assert.Equal(OddData, data.ToArray());
}
[Fact]
[SkippableFact]
public void DataCanBeCreatedFromFile()
{
var data = SKData.Create(Path.Combine(PathToImages, "baboon.jpg"));
@ -27,7 +27,7 @@ namespace SkiaSharp.Tests
Assert.True(data.Size > 0);
}
[Fact]
[SkippableFact]
public void ReleaseDataWasInvoked()
{
bool released = false;

Просмотреть файл

@ -7,7 +7,7 @@ namespace SkiaSharp.Tests
{
public class SKDocumentTest : SKTest
{
[Fact]
[SkippableFact]
public void CanCreatePdf()
{
using (var stream = new MemoryStream())
@ -27,7 +27,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void CanCreateXps()
{
// XPS is only supported on Windows

Просмотреть файл

@ -15,7 +15,7 @@ namespace SkiaSharp.Tests
private readonly byte[] TwentyBytes = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 };
[Fact]
[SkippableFact]
public void ImageCanBeDecoded()
{
var path = Path.Combine(PathToImages, "color-wheel.png");
@ -27,7 +27,7 @@ namespace SkiaSharp.Tests
Assert.NotNull(bitmap.PeekPixels());
}
[Fact]
[SkippableFact]
public void OnlyReadWorks()
{
var ms = new MemoryStream(TwentyBytes);
@ -46,7 +46,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new byte[] { 15, 16, 17, 18, 19, 20, 0 }, buffer);
}
[Fact]
[SkippableFact]
public void RewindInBufferWorks()
{
var ms = new MemoryStream(TwentyBytes);
@ -71,7 +71,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new byte[] { 8, 9, 10, 11, 12, 13, 14 }, buffer);
}
[Fact]
[SkippableFact]
public void SeekInBufferWorks()
{
var ms = new MemoryStream(TwentyBytes);
@ -91,7 +91,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new byte[] { 3, 4, 5, 6, 7, 8, 9 }, buffer);
}
[Fact]
[SkippableFact]
public void ReadPastBufferAfterSeekInBufferWorks()
{
var ms = new MemoryStream(TwentyBytes);
@ -111,7 +111,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new byte[] { 6, 7, 8, 9, 10, 11, 12 }, buffer);
}
[Fact]
[SkippableFact]
public void RewindOutsideBufferThrows()
{
var ms = new MemoryStream(TwentyBytes);

Просмотреть файл

@ -5,7 +5,7 @@ namespace SkiaSharp.Tests
{
public class SKImageTest : SKTest
{
[Fact]
[SkippableFact]
public void EncodeWithSimpleSerializer()
{
var bitmap = CreateTestBitmap();
@ -27,7 +27,7 @@ namespace SkiaSharp.Tests
Assert.True(encoded);
}
[Fact]
[SkippableFact]
public void EncodeWithSerializer()
{
var bitmap = CreateTestBitmap();

Просмотреть файл

@ -8,7 +8,7 @@ namespace SkiaSharp.Tests
{
public class SKManagedStreamTest : SKTest
{
[Fact]
[SkippableFact]
public void ManagedStreamReadsByteCorrectly()
{
var data = new byte[1024];
@ -39,7 +39,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void ManagedStreamReadsChunkCorrectly()
{
var data = new byte[1024];
@ -61,7 +61,7 @@ namespace SkiaSharp.Tests
Assert.Equal(data.Take(buffer.Length), buffer);
}
[Fact]
[SkippableFact]
public void ManagedStreamReadsOffsetChunkCorrectly()
{
var data = new byte[1024];
@ -87,7 +87,7 @@ namespace SkiaSharp.Tests
Assert.Equal(resultData, buffer);
}
[Fact]
[SkippableFact]
public void ManagedStreamIsNotCollectedPrematurely()
{
using (var stream = new SKDynamicMemoryWStream())

Просмотреть файл

@ -10,7 +10,7 @@ namespace SkiaSharp.Tests
private const float EPSILON = 0.0001f;
private const int PRECISION = 4;
[Fact]
[SkippableFact]
public unsafe void FixedImageMaskIsHandledCorrectly()
{
byte rawMask = 1 << 7 | 0 << 6 | 0 << 5 | 1 << 4 | 1 << 3 | 0 << 2 | 1 << 1 | 1;
@ -27,7 +27,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void MonochromeMaskBufferIsCopied()
{
byte rawMask = 1 << 7 | 0 << 6 | 0 << 5 | 1 << 4 | 1 << 3 | 0 << 2 | 1 << 1 | 1;
@ -43,7 +43,7 @@ namespace SkiaSharp.Tests
mask.FreeImage();
}
[Fact]
[SkippableFact]
public void Alpha8MaskBufferIsCopied()
{
var buffer = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 };
@ -65,7 +65,7 @@ namespace SkiaSharp.Tests
mask.FreeImage();
}
[Fact]
[SkippableFact]
public void ThirtyTwoBitMaskBufferIsCopied()
{
var buffer = new byte[]

Просмотреть файл

@ -10,7 +10,7 @@ namespace SkiaSharp.Tests
private const float EPSILON = 0.0001f;
private const int PRECISION = 4;
[Fact]
[SkippableFact]
public void Matrix44CreatesIdentity()
{
var matrix = SKMatrix44.CreateIdentity();
@ -26,7 +26,7 @@ namespace SkiaSharp.Tests
Assert.Equal(expectedRowMajor, rowMajor);
}
[Fact]
[SkippableFact]
public void Matrix44Inverts()
{
var rowMajor = new float[] {
@ -56,7 +56,7 @@ namespace SkiaSharp.Tests
Assert.Equal(expectedRowMajor, actualRowMajor);
}
[Fact]
[SkippableFact]
public void Matrix44ConvertsToMatrix()
{
var rowMajor44 = new float[] {
@ -79,7 +79,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKMatrix.MakeRotationDegrees(45).Values, matrix44.Matrix.Values);
}
[Fact]
[SkippableFact]
public void Matrix44MapsScalars()
{
// translate
@ -101,7 +101,7 @@ namespace SkiaSharp.Tests
Assert.Equal(new[] { 0f, 25f, -5f, 1f }, resultRotateValue.Select(v => (int)(v / EPSILON) * EPSILON));
}
[Fact]
[SkippableFact]
public void Matrix44MapsPoints()
{
// translate
@ -124,7 +124,7 @@ namespace SkiaSharp.Tests
Assert.Equal(25, resultRotateValue.Y, PRECISION);
}
[Fact]
[SkippableFact]
public void Matrix44MapsPointsBulk()
{
var rnd = new Random();

Просмотреть файл

@ -7,7 +7,7 @@ namespace SkiaSharp.Tests
{
public class SKPaintTest : SKTest
{
[Fact]
[SkippableFact]
public void StrokePropertyValuesAreCorrect()
{
var paint = new SKPaint();
@ -19,7 +19,7 @@ namespace SkiaSharp.Tests
Assert.False(paint.IsStroke);
}
[Fact]
[SkippableFact]
public void GetFillPathIsWorking()
{
var paint = new SKPaint();
@ -37,7 +37,7 @@ namespace SkiaSharp.Tests
Assert.Equal(4, fillPath.PointCount);
}
[Fact]
[SkippableFact]
public void GetFillPathIsWorkingWithLine()
{
var paint = new SKPaint();
@ -67,7 +67,7 @@ namespace SkiaSharp.Tests
}
// Test for issue #276
[Fact]
[SkippableFact]
public void NonAntiAliasedTextOnScaledCanvasIsCorrect()
{
using (var bitmap = new SKBitmap(new SKImageInfo(200, 200)))
@ -133,7 +133,7 @@ namespace SkiaSharp.Tests
}
// Test for the "workaround" for issue #282
[Fact]
[SkippableFact]
public void DrawTransparentImageWithHighFilterQualityWithPremul()
{
var oceanColor = (SKColor)0xFF9EB4D6;

Просмотреть файл

@ -37,7 +37,7 @@ namespace SkiaSharp.Tests
Assert.Equal (str, str2);
}
[Fact]
[SkippableFact]
public void PathPointsAreCorrect()
{
using (var path = new SKPath ()) {
@ -70,7 +70,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void PathContainsPoint()
{
using (var path = new SKPath ()) {
@ -81,7 +81,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void GetLastPoint()
{
using (var path = new SKPath ()) {
@ -92,7 +92,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void ThumbtackShapeIsConcave ()
{
// based on test_skbug_3469
@ -106,7 +106,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void PathConsistentAfterClose ()
{
// based on test_path_close_issue1474
@ -161,7 +161,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void ParsePathReturnsValidPath ()
{
// based on ParsePath
@ -188,7 +188,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void PathBoundsAndRegionBoundsMatch ()
{
var path = new SKPath ();
@ -211,7 +211,7 @@ namespace SkiaSharp.Tests
Assert.Equal (90f, regionBounds.Bottom);
}
[Fact]
[SkippableFact]
public void BoundsAndTightBoundAreCorrect ()
{
const int Precision = 6;
@ -235,7 +235,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void MeasuringSegementsWorks ()
{
using (SKPath path = new SKPath ())
@ -258,7 +258,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void TightBoundsForEnclosedPathIsNotZero ()
{
const int Precision = 3;

Просмотреть файл

@ -6,7 +6,7 @@ namespace SkiaSharp.Tests
{
public class SKPixmapTest : SKTest
{
[Fact]
[SkippableFact]
public void ReadPixelSucceeds()
{
var info = new SKImageInfo(10, 10);
@ -21,7 +21,7 @@ namespace SkiaSharp.Tests
Assert.True(result);
}
[Fact]
[SkippableFact]
public void WithMethodsDoNotModifySource()
{
var info = new SKImageInfo(100, 30, SKColorType.Rgb565, SKAlphaType.Unpremul);
@ -38,7 +38,7 @@ namespace SkiaSharp.Tests
Assert.Equal((IntPtr)123, copy.GetPixels());
}
[Fact]
[SkippableFact]
public void ReadPixelCopiesData()
{
var info = new SKImageInfo(10, 10);

Просмотреть файл

@ -6,7 +6,7 @@ namespace SkiaSharp.Tests
{
public class SKRegionTest : SKTest
{
[Fact]
[SkippableFact]
public void SetPathWithoutClipDoesNotCreateEmptyRegion()
{
var path = new SKPath();
@ -19,7 +19,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKRectI.Truncate(path.Bounds), region.Bounds);
}
[Fact]
[SkippableFact]
public void SetPathWithEmptyClipDoesCreatesEmptyRegion()
{
var path = new SKPath();
@ -32,7 +32,7 @@ namespace SkiaSharp.Tests
Assert.Equal(SKRectI.Empty, region.Bounds);
}
[Fact]
[SkippableFact]
public void SetPathWithClipDoesCreatesCorrectRegion()
{
var clipRect = new SKRectI(25, 25, 50, 50);

Просмотреть файл

@ -11,7 +11,7 @@ namespace HarfBuzzSharp.Tests
{
public class SKShaperTest : TestBase
{
[Fact]
[SkippableFact]
public void DrawShapedTextExtensionMethodDraws()
{
using (var surface = SKSurface.Create(new SKImageInfo(512, 512)))
@ -34,7 +34,7 @@ namespace HarfBuzzSharp.Tests
}
}
[Fact]
[SkippableFact]
public void CorrectlyShapesArabicScriptAtAnOffset()
{
var clusters = new uint[] { 4, 2, 0 };
@ -53,7 +53,7 @@ namespace HarfBuzzSharp.Tests
}
}
[Fact]
[SkippableFact]
public void CorrectlyShapesArabicScript()
{
var clusters = new uint[] { 4, 2, 0 };

Просмотреть файл

@ -6,7 +6,7 @@ namespace SkiaSharp.Tests
{
public class SKStringTest : SKTest
{
[Fact]
[SkippableFact]
public void StringIsMarshaledCorrectly ()
{
using (var typeface = SKTypeface.FromFile (Path.Combine (PathToFonts, "SpiderSymbol.ttf")))

Просмотреть файл

@ -35,7 +35,7 @@ namespace SkiaSharp.Tests
bitmap.UnlockBits(data);
}
[Fact]
[SkippableFact]
public void SurfaceCanvasReturnTheSameInstance()
{
Draw(surface =>
@ -53,7 +53,7 @@ namespace SkiaSharp.Tests
});
}
[Fact]
[SkippableFact]
public void SecondSurfaceWasCreatedDifferent()
{
var data = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, bitmap.PixelFormat);
@ -73,7 +73,7 @@ namespace SkiaSharp.Tests
bitmap.UnlockBits(data);
}
[Fact]
[SkippableFact]
public void SurfaceWasCreated()
{
var data = bitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.WriteOnly, bitmap.PixelFormat);

Просмотреть файл

@ -144,7 +144,7 @@ namespace SkiaSharp.Tests
throw new PlatformNotSupportedException();
}
} catch (Exception ex) {
throw new Exception("Unable to create GL context: " + ex.Message);
throw new SkipException("Unable to create GL context: " + ex.Message);
}
}

Просмотреть файл

@ -22,13 +22,13 @@ namespace SkiaSharp.Tests
0x02, 0x00, 0x24, 0x00, 0x44,
};
[Fact]
[SkippableFact]
public void NullInWrongFileName()
{
Assert.Null(SKTypeface.FromFile(Path.Combine(PathToFonts, "font that doesn't exist.ttf")));
}
[Fact]
[SkippableFact]
public void TestFamilyName()
{
using (var typeface = SKTypeface.FromFile(Path.Combine(PathToFonts, "Roboto2-Regular_NoEmbed.ttf")))
@ -55,7 +55,7 @@ namespace SkiaSharp.Tests
(UInt32)(v[3]) << 00;
}
[Fact]
[SkippableFact]
public void TestGetTableTags()
{
using (var typeface = SKTypeface.FromFile(Path.Combine(PathToFonts, "SpiderSymbol.ttf")))
@ -70,7 +70,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void TestGetTableData()
{
using (var typeface = SKTypeface.FromFile(Path.Combine(PathToFonts, "ReallyBigA.ttf")))
@ -88,7 +88,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void TestFontManagerMatchCharacter()
{
var fonts = SKFontManager.Default;
@ -105,7 +105,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void ExceptionInInvalidGetTableData()
{
using (var typeface = SKTypeface.FromFile(Path.Combine(PathToFonts, "Distortable.ttf")))
@ -114,7 +114,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void TestTryGetTableData()
{
using (var typeface = SKTypeface.FromFile(Path.Combine(PathToFonts, "ReallyBigA.ttf")))
@ -131,7 +131,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void InvalidTryGetTableData()
{
using (var typeface = SKTypeface.FromFile(Path.Combine(PathToFonts, "Distortable.ttf")))
@ -142,7 +142,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void CanReadData()
{
var bytes = File.ReadAllBytes(Path.Combine(PathToFonts, "Distortable.ttf"));
@ -153,7 +153,7 @@ namespace SkiaSharp.Tests
}
}
[Fact]
[SkippableFact]
public void CanReadNonSeekableStream()
{
using (var stream = File.OpenRead(Path.Combine(PathToFonts, "Distortable.ttf")))