DataCanBeCreatedFromManagedStream
This commit is contained in:
Родитель
035515783e
Коммит
7b1399f5f8
|
@ -25,7 +25,7 @@ void RunTests(FilePath testAssembly, bool is32)
|
|||
Parallelism = ParallelismOption.All,
|
||||
OutputDirectory = dir,
|
||||
WorkingDirectory = dir,
|
||||
ArgumentCustomization = args => args.Append("-verbose -method \"SkiaSharp.Tests.SKDataTest.DataCanBeCreatedFromStream\""),
|
||||
ArgumentCustomization = args => args.Append("-verbose -method \"SkiaSharp.Tests.SKDataTest.DataCanBeCreatedFromManagedStream\""),
|
||||
};
|
||||
var traits = CreateTraitsDictionary(UNSUPPORTED_TESTS);
|
||||
foreach (var trait in traits) {
|
||||
|
|
|
@ -47,6 +47,17 @@ namespace SkiaSharp.Tests
|
|||
Assert.True(data.Size > 0);
|
||||
}
|
||||
|
||||
[SkippableFact]
|
||||
public void DataCanBeCreatedFromManagedStream()
|
||||
{
|
||||
using var managed = File.OpenRead(Path.Combine(PathToImages, "baboon.jpg"));
|
||||
using var stream = new SKManagedStream(managed);
|
||||
using var data = SKData.Create(stream);
|
||||
|
||||
Assert.NotNull(data);
|
||||
Assert.True(data.Size > 0);
|
||||
}
|
||||
|
||||
[SkippableFact]
|
||||
public void DataCanBeCreatedFromFile()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче