The log window took any text in the two report columns. It now checks the report the same way it checks the zone or the section: RST on most modes, and a signal-to-noise ratio in decibels on FT8, FT4, JT65, Q65 and MSK144. A WAE QTC row is skipped, because it keeps the time sent and the other station's call in those two columns. The grid column is checked on every contest now, not only when the contest asks for a locator, and the value is stored as JN88dd. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015NZkFxHde1iifAQemFTHxf
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
namespace Nonemm.Core.Tests;
|
|
|
|
public class SignalReportTests
|
|
{
|
|
[Theory]
|
|
[InlineData("599")]
|
|
[InlineData("59")]
|
|
[InlineData("339")]
|
|
[InlineData("111")]
|
|
public void AnRstReportIsTaken(string report) =>
|
|
Assert.True(SignalReport.IsPlausible(report, Modes.Cw));
|
|
|
|
[Theory]
|
|
[InlineData("nice signal")]
|
|
[InlineData("5")]
|
|
[InlineData("5999")]
|
|
[InlineData("699")]
|
|
[InlineData("509")]
|
|
[InlineData("590")]
|
|
[InlineData("5N9")]
|
|
public void TextThatIsNotAnRstReportIsRefused(string report) =>
|
|
Assert.False(SignalReport.IsPlausible(report, Modes.Cw));
|
|
|
|
/// FT8 and the other weak-signal modes exchange a signal-to-noise ratio.
|
|
[Theory]
|
|
[InlineData("-12", true)]
|
|
[InlineData("+03", true)]
|
|
[InlineData("0", true)]
|
|
[InlineData("599", false)]
|
|
[InlineData("-99", false)]
|
|
public void AWeakSignalModeReportsDecibels(string report, bool taken) =>
|
|
Assert.Equal(taken, SignalReport.IsPlausible(report, Modes.Ft8));
|
|
|
|
[Fact]
|
|
public void RttyStillReportsRst() =>
|
|
Assert.True(SignalReport.IsPlausible("599", Modes.Rtty));
|
|
|
|
[Fact]
|
|
public void ThePhoneExampleHasNoTone() =>
|
|
Assert.Equal("59", SignalReport.Example(Modes.Usb));
|
|
}
|