Check a .udc section multiplier against the list the file names
MultWindowType names the list N1MM validates a received section against, and every exchange that was not all digits counted as a multiplier here. Four of N1MM's lists are held now -- the ARRL sections, the US states, the Canadian provinces and the 165 OK/OM districts, which came out of N1MM's own exe -- and a file naming one of them counts only the values on it. A file naming any of the hundred-odd others keeps the old rule. The 2023 OK/OM DX log now scores contact for contact as N1MM did. Two contacts in the 2026 log still differ: the district code is stored with a trailing space, which N1MM matches against its list untrimmed, so it counts no multiplier where this counts one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
@@ -264,9 +264,8 @@ public class UdcScoringTests
|
||||
|
||||
/// The received exchange of a contest where one side sends a section and
|
||||
/// the other a serial number lands in the same column, and only the
|
||||
/// section counts. N1MM checks it against the contest's section list; the
|
||||
/// lists are not held here, so an exchange that is all digits is taken for
|
||||
/// a serial number.
|
||||
/// section counts. A file that names no list this program holds falls back
|
||||
/// to taking an exchange of all digits for a serial number.
|
||||
[Fact]
|
||||
public void ASerialNumberIsNoSectionMultiplier()
|
||||
{
|
||||
@@ -275,6 +274,23 @@ public class UdcScoringTests
|
||||
Assert.Single(LogFor(contest).Judge(TestLog.Contact("OM3XYZ", section: "NOV")).NewMultipliers);
|
||||
}
|
||||
|
||||
/// `MultWindowType` names the list N1MM checks the section against. `GZS`
|
||||
/// is an OK/OM district and counts; `NOV` and the US state `MA` are not on
|
||||
/// that list and count for neither program.
|
||||
[Theory]
|
||||
[InlineData("GZS", 1)]
|
||||
[InlineData("NOV", 0)]
|
||||
[InlineData("MA", 0)]
|
||||
public void ASectionOffTheContestsListIsNoMultiplier(string section, int expected) =>
|
||||
Assert.Equal(
|
||||
expected,
|
||||
LogFor(Contest(
|
||||
"MultSqlString=Section",
|
||||
"IsMultPer=1",
|
||||
"MultWindowType=OKOMDX"))
|
||||
.Judge(TestLog.Contact("OM3XYZ", section: section))
|
||||
.NewMultipliers.Count);
|
||||
|
||||
/// Published files hold `Country` in this key; the UDC editor puts
|
||||
/// `CountryPrefix` there.
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user