Skip to content

Commit

Permalink
Add protected internal to test classes too, since this project has …
Browse files Browse the repository at this point in the history
…InternalsVisibleTo configured
  • Loading branch information
maxkatz6 committed Aug 15, 2024
1 parent ffd76e2 commit ac124fe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions tests/Tests/SkiaSharp/ManagedStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ namespace SkiaSharp.Tests
{
public class ManagedStream : SKAbstractManagedStream
{
protected override IntPtr OnRead (IntPtr buffer, IntPtr size) => (IntPtr)0;
protected internal override IntPtr OnRead (IntPtr buffer, IntPtr size) => (IntPtr)0;

protected override IntPtr OnPeek (IntPtr buffer, IntPtr size) => (IntPtr)0;
protected internal override IntPtr OnPeek (IntPtr buffer, IntPtr size) => (IntPtr)0;

protected override bool OnIsAtEnd () => false;
protected internal override bool OnIsAtEnd () => false;

protected override bool OnHasPosition () => false;
protected internal override bool OnHasPosition () => false;

protected override bool OnHasLength () => false;
protected internal override bool OnHasLength () => false;

protected override bool OnRewind () => false;
protected internal override bool OnRewind () => false;

protected override IntPtr OnGetPosition () => (IntPtr)0;
protected internal override IntPtr OnGetPosition () => (IntPtr)0;

protected override IntPtr OnGetLength () => (IntPtr)0;
protected internal override IntPtr OnGetLength () => (IntPtr)0;

protected override bool OnSeek (IntPtr position) => false;
protected internal override bool OnSeek (IntPtr position) => false;

protected override bool OnMove (int offset) => false;
protected internal override bool OnMove (int offset) => false;

protected override IntPtr OnCreateNew () => IntPtr.Zero;
protected internal override IntPtr OnCreateNew () => IntPtr.Zero;
}
}
8 changes: 4 additions & 4 deletions tests/Tests/SkiaSharp/SKDrawableTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,28 +107,28 @@ class TestDrawable : SKDrawable
public int SnapshotFireCount;
public int ApproxBytesCount;

protected override void OnDraw(SKCanvas canvas)
protected internal override void OnDraw(SKCanvas canvas)
{
DrawFireCount++;

canvas.DrawColor(SKColors.Blue);
}

protected override SKRect OnGetBounds()
protected internal override SKRect OnGetBounds()
{
BoundsFireCount++;

return SKRect.Create(100, 100);
}

protected override SKPicture OnSnapshot()
protected internal override SKPicture OnSnapshot()
{
SnapshotFireCount++;

return base.OnSnapshot();
}

protected override int OnGetApproximateBytesUsed ()
protected internal override int OnGetApproximateBytesUsed ()
{
ApproxBytesCount++;

Expand Down
8 changes: 4 additions & 4 deletions tests/Tests/SkiaSharp/SKFrontBufferedManagedStreamTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ public LengthOptionalStream (bool hasLength, bool hasPosition)
fHasPosition = hasPosition;
}

protected override bool OnHasLength () => fHasLength;
protected internal override bool OnHasLength () => fHasLength;

protected override bool OnHasPosition () => fHasPosition;
protected internal override bool OnHasPosition () => fHasPosition;
}

[SkippableTheory]
Expand Down Expand Up @@ -222,9 +222,9 @@ private class FailingStream : ManagedStream
{
private bool fAtEnd;

protected override bool OnIsAtEnd () => fAtEnd;
protected internal override bool OnIsAtEnd () => fAtEnd;

protected override IntPtr OnRead (IntPtr buffer, IntPtr size)
protected internal override IntPtr OnRead (IntPtr buffer, IntPtr size)
{
Assert.False (fAtEnd);
fAtEnd = true;
Expand Down
4 changes: 2 additions & 2 deletions tests/Tests/SkiaSharp/SKGraphicsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ public TextWriterDump(bool detailedDump, bool dumpWrappedObjects)

public List<string> Lines { get; } = new List<string>();

protected override void OnDumpNumericValue(string dumpName, string valueName, string units, ulong value) =>
protected internal override void OnDumpNumericValue(string dumpName, string valueName, string units, ulong value) =>
Lines.Add($"{dumpName}.{valueName} = {value} {units}");

protected override void OnDumpStringValue(string dumpName, string valueName, string value) =>
protected internal override void OnDumpStringValue(string dumpName, string valueName, string value) =>
Lines.Add($"{dumpName}.{valueName} = '{value}'");
}
}
Expand Down

0 comments on commit ac124fe

Please sign in to comment.