summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2026-10-20 22:35:06 +0100
committerDave Hibberd <hibby@debian.org>2026-10-20 22:35:06 +0100
commit82ebb1ed1af30cee4dfbb1c628431d32885a00e0 (patch)
tree1a1f782d3e576b758be0bc61171574a7cd8f2376 /test
parent061658210acb6425517733ea012dda803a7f72a1 (diff)
parent61d684922b0f1c8455cc60eb3d123df058c9e1f5 (diff)
Merge tag 'debian/3.3.0_beta2+dfsg-1' into hibbian/trixie-backports
tagging wsjtx 3.3.0~beta2+dfsg-1
Diffstat (limited to 'test')
-rw-r--r--test/apply_routing_test.f9043
-rw-r--r--test/fixtures/jt4_OK1KIR_141105_175700.expected.txt2
2 files changed, 42 insertions, 3 deletions
diff --git a/test/apply_routing_test.f90 b/test/apply_routing_test.f90
index ac675cc4..f6e40eed 100644
--- a/test/apply_routing_test.f90
+++ b/test/apply_routing_test.f90
@@ -21,8 +21,8 @@
!
! params_block is re-exported from streaming_apply (it owns the include); the
! baseline is a realistic params built via jt9_params_init's init routines.
-! Compiled + run by test/run-apply-routing-unit.sh against lib/streaming_control.f90
-! + lib/jt9_params_init.f90 + lib/streaming_apply.f90, in an ISOLATED module dir.
+! Registered with CTest as test_streaming_apply; the standalone
+! test/run-apply-routing-unit.sh also supports running this driver.
program apply_routing_test
use streaming_control, only: configure_fields
use jt9_params_init, only: cli_args_t, init_default_params, &
@@ -46,6 +46,7 @@ program apply_routing_test
call frame_multithreaded_guard()
call frame_qso_guard()
call frame_utc_precedence()
+ call frame_fst4_utc()
call frame_phase9_pack()
write(*,'(a)') '------------------------------------------------------------'
@@ -600,6 +601,44 @@ contains
call ok('nutc+utc -> utc WINS (nutc = 133430, not 120000)', p%nutc .eq. 133430)
end subroutine frame_utc_precedence
+ subroutine frame_fst4_utc()
+ type(configure_fields) :: cfg, blank
+ type(params_block) :: p
+ integer :: md, mode
+ real(8) :: tr
+ character(len=16) :: label
+
+ do mode = 240, 242
+ write(label,'(a,i0)') 'mode ', mode
+ call fresh(p)
+ cfg = blank
+ cfg%mode_set = .true.; cfg%mode = mode
+ cfg%trperiod_set = .true.; cfg%trperiod = 120.d0
+ cfg%nutc_set = .true.; cfg%nutc = 120000
+ md = 8; tr = 15.d0
+ call apply_configure_fields(cfg, md, tr, p, BNFA, BNFB)
+ call ok(trim(label)//': full numeric noon stays HHMMSS', p%nutc .eq. 120000)
+
+ cfg%mode_set = .false.; cfg%trperiod_set = .false.
+ cfg%nutc = 1234
+ call apply_configure_fields(cfg, md, tr, p, BNFA, BNFB)
+ call ok(trim(label)//': legacy numeric HHMM becomes HHMMSS', p%nutc .eq. 123400)
+
+ cfg%nutc = 15
+ call apply_configure_fields(cfg, md, tr, p, BNFA, BNFB)
+ call ok(trim(label)//': legacy numeric 0015 means 00:15:00', p%nutc .eq. 1500)
+
+ cfg%nutc = 2359
+ cfg%utc_set = .true.; cfg%utc_nutc = 1500
+ call apply_configure_fields(cfg, md, tr, p, BNFA, BNFB)
+ call ok(trim(label)//': ISO 00:15:00 overrides numeric HHMM', p%nutc .eq. 1500)
+
+ cfg%nutc_set = .false.; cfg%utc_nutc = 30
+ call apply_configure_fields(cfg, md, tr, p, BNFA, BNFB)
+ call ok(trim(label)//': ISO 00:00:30 retains seconds', p%nutc .eq. 30)
+ end do
+ end subroutine frame_fst4_utc
+
! Frame PHASE9-PACK (Phase 9): the two derived packed ints route
! FLAT to params%ndepth / params%nexp_decode. The bit-PACKING itself (each wire
! key -> its bit, the contest collapse, the masking/clamp) is asserted by the
diff --git a/test/fixtures/jt4_OK1KIR_141105_175700.expected.txt b/test/fixtures/jt4_OK1KIR_141105_175700.expected.txt
index 5add3711..97837102 100644
--- a/test/fixtures/jt4_OK1KIR_141105_175700.expected.txt
+++ b/test/fixtures/jt4_OK1KIR_141105_175700.expected.txt
@@ -1,2 +1,2 @@
-**** -14 1.8 1199 $# G3WDG OK1KIR RRR f
+1757 -14 1.8 1199 $# G3WDG OK1KIR RRR f
<DecodeFinished> 0 1 0