From 31ccabecd21c2ca3fa2cca0951a25d10449e9c68 Mon Sep 17 00:00:00 2001 From: routersys Date: Sat, 10 Oct 2026 10:04:51 +0900 Subject: [PATCH] =?UTF-8?q?=E5=8F=8E=E5=B7=AE=E3=81=AE=E4=B8=8A=E9=99=90?= =?UTF-8?q?=E3=81=AE=E5=A2=83=E7=95=8C=E3=82=92=E8=A9=A6=E9=A8=93=E3=81=A7?= =?UTF-8?q?=E5=9B=BA=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WaveOpticsDepthProcessorTests.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/WaveOptics.Tests/WaveOpticsDepthProcessorTests.cs b/WaveOptics.Tests/WaveOpticsDepthProcessorTests.cs index 137e532..b73924f 100644 --- a/WaveOptics.Tests/WaveOpticsDepthProcessorTests.cs +++ b/WaveOptics.Tests/WaveOpticsDepthProcessorTests.cs @@ -247,6 +247,26 @@ public sealed class WaveOpticsDepthProcessorTests AssertIdentical(Render(manual, At(0f)), Render(effect, At(z))); } + [Theory] + [InlineData(nameof(WaveOpticsEffect.Defocus))] + [InlineData(nameof(WaveOpticsEffect.AstigmatismVertical))] + [InlineData(nameof(WaveOpticsEffect.AstigmatismOblique))] + [InlineData(nameof(WaveOpticsEffect.ComaHorizontal))] + [InlineData(nameof(WaveOpticsEffect.ComaVertical))] + [InlineData(nameof(WaveOpticsEffect.Spherical))] + public void AnAberrationIsKeptUpToTenWavesAndClampedBeyond(string aberration) + { + static Rendering With(string name, double waves) + { + var effect = Effect(false); + ((Animation)typeof(WaveOpticsEffect).GetProperty(name)!.GetValue(effect)!).Values[0].Value = waves; + return Render(effect, At(0f)); + } + + AssertDiffers(With(aberration, 9.5d), With(aberration, 10d)); + AssertIdentical(With(aberration, 10d), With(aberration, 12d)); + } + [Theory] [InlineData(nameof(WaveOpticsEffect.FocalLength))] [InlineData(nameof(WaveOpticsEffect.FocusDistance))]