Skip to content

Commit f3311a1

Browse files
NeverMorewdclaude
andcommitted
fix: restore CrtDisplay.PositiveMod accessibility for unit tests
A previous code-review pass changed PositiveMod to private static, breaking CrtDisplayTests which call it directly via CrtDisplay.PositiveMod. Fix: - private static → internal static (keeps it off the public API) - Add Properties/AssemblyInfo.cs with [InternalsVisibleTo("Pipboy.Avalonia.Tests")] so the test project can access internal members without any visibility leaks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 883eff0 commit f3311a1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Pipboy.Avalonia/Controls/CrtDisplay.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ private void EnsureFlickerBrushes()
809809
/// <summary>
810810
/// Always-positive modulo. Returns 0 when <paramref name="m"/> is zero or negative.
811811
/// </summary>
812-
private static double PositiveMod(double x, double m)
812+
internal static double PositiveMod(double x, double m)
813813
{
814814
if (m <= 0) return 0;
815815
double r = x % m;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using System.Runtime.CompilerServices;
2+
3+
// Allow the unit test project to access internal members (e.g. CrtDisplay.PositiveMod).
4+
[assembly: InternalsVisibleTo("Pipboy.Avalonia.Tests")]

0 commit comments

Comments
 (0)