6.2 KiB
Test TODO
This file is the current backlog for building out the MATLAB test suite. It should reflect the repository state now, not the original plan.
Current Status
Fast profile status:
run_all_tests('profile','fast')- latest verified result:
Passed: 59 | Failed: 0 | Incomplete: 0 - explicit placeholder tests remaining:
70
Mandatory workflow for every future test-writing session:
- Read the target class implementation in
Classes/...before writing or changing tests. - Read the current placeholder or existing test in
Tests/.... - Replace or extend the existing test. Do not create duplicate test files.
- Use the existing
matlab.unittestframework and extendIMDDTestCase. - Tag new tests with
TestTags. - Run the relevant test entrypoint after implementation.
- Do not consider the task complete until the test run result is checked.
Completed Base Tests
These are already implemented and verified in the fast profile:
Classes/00_signals/Signal.m->Tests/00_signals/Signal_test.mClasses/00_signals/Informationsignal.m->Tests/00_signals/Informationsignal_test.mClasses/00_signals/Electricalsignal.m->Tests/00_signals/Electricalsignal_test.mClasses/01_transmit/PAMmapper.m->Tests/01_transmit/PAMmapper_test.mClasses/01_transmit/PAMsource.m->Tests/01_transmit/PAMsource_test.mClasses/01_transmit/Pulseformer.m->Tests/01_transmit/Pulseformer_test.mClasses/02_optical/Fiber.m->Tests/02_optical/Fiber_test.mClasses/03_receive/Photodiode.m->Tests/03_receive/Photodiode_test.mClasses/03_receive/Scope.m->Tests/03_receive/Scope_test.mClasses/04_DSP/TransmissionPerformance.m->Tests/04_DSP/TransmissionPerformance_test.mClasses/04_DSP/Equalizer/FFE.m->Tests/04_DSP/Equalizer/FFE_test.mClasses/04_DSP/Sequence Detection/MLSE.m->Tests/04_DSP/Sequence Detection/MLSE_test.mClasses/04_DSP/Timing Recovery/Timing_Recovery.m->Tests/04_DSP/Timing Recovery/T_04_DSP_Timing_Recovery_Timing_Recovery_test.m
Notes:
Opticalsignal_test.mstill appears to be a placeholder and should be treated as unfinished.- There are multiple
Timing_Recoveryclass names in the repo, so the implemented base-class test currently uses the disambiguated file name:Tests/04_DSP/Timing Recovery/T_04_DSP_Timing_Recovery_Timing_Recovery_test.m
Next Priority Tests
Highest-value unfinished tests to implement next:
-
Classes/00_signals/Opticalsignal.mTests/00_signals/Opticalsignal_test.mFocus:- constructor metadata wiring
delaycspr- interaction with inherited signal behavior
-
Classes/01_transmit/Signalgenerator.mTests/01_transmit/Signalgenerator_test.mFocus:- constructor/config defaults
- deterministic generation path
- output type and shape
-
Classes/02_etc/Filter.mTests/02_etc/Filter_test.mFocus:- deterministic filter construction
processbehavior on small signals- output rate/length invariants
-
Classes/02_etc/Amplifier.mTests/02_etc/Amplifier_test.mFocus:- gain behavior
- noise-free baseline
- output class and metadata behavior
-
Classes/02_optical/EML.mTests/02_optical/EML_test.mFocus:- deterministic modulation path
- output class and metadata
- small synthetic fixture only
-
Classes/02_optical/Optical_Multiplex.mTests/02_optical/Optical_Multiplex_test.mFocus:- combining channels
- output dimensions
- metadata handling
-
Classes/02_optical/Optical_Demultiplex.mTests/02_optical/Optical_Demultiplex_test.mFocus:- deterministic channel extraction
- output dimensions
- basic round-trip expectations with multiplexing if practical
-
Classes/02_optical/Polarization_Controller.mTests/02_optical/Polarization_Controller_test.mFocus:- deterministic transform behavior
- shape preservation
-
Classes/02_optical/DP_Fiber.mTests/02_optical/DP_Fiber_test.mFocus:- very small deterministic sanity checks only
- avoid long or GPU-heavy runs
Next DSP Layer
After the items above, continue with these:
Classes/04_DSP/Coding/Duobinary.mTests/04_DSP/Coding/Duobinary_test.mClasses/04_DSP/Coding/MRDS_coding.mTests/04_DSP/Coding/MRDS_coding_test.mClasses/04_DSP/Sequence Detection/MLSE_viterbi.mTests/04_DSP/Sequence Detection/MLSE_viterbi_test.mClasses/04_DSP/Sequence Detection/MLSE_new.mTests/04_DSP/Sequence Detection/MLSE_new_test.mClasses/04_DSP/Timing Recovery/Time_Shifter.mTests/04_DSP/Timing Recovery/Time_Shifter_test.mClasses/04_DSP/Timing Recovery/Godard_Timing_Recovery.mTests/04_DSP/Timing Recovery/Godard_Timing_Recovery_test.mClasses/04_DSP/Timing Recovery/MaxVar_Timing_Recovery.mTests/04_DSP/Timing Recovery/MaxVar_Timing_Recovery_test.m
Then move on to the remaining equalizer variants:
EQ.mEQ_copy.mEQ_silas*.mFFE_*ML_MLSE*.mPostfilter.mVNLE.m
Lower Priority Areas
Leave these for later unless a current task depends on them:
Classes/Warehouse_class/*Classes/DataBaseHandler/*- template/example classes like
class_template
Excluded From Automated Testing
Do not create or run automated tests for lab device classes in this repository.
Excluded area:
Classes/05_Lab/*
Reason:
- the device IPs are reachable in this environment
- executing these classes can change instrument set points
- this can interfere with external or ongoing experiments
Rule for future sessions:
- do not implement
Tests/05_Lab/* - do not run files that communicate with lab devices
- do not add these classes back into the active TODO backlog unless explicitly requested by the user for a controlled setup
Session Prompt Checklist
Every future agent prompt should include these requirements:
- read the class implementation first
- read the current test file second
- implement the test in the existing file
- prefer deterministic synthetic fixtures
- avoid plotting and hardware unless required
- never run or implement
05_Labtests in normal agent sessions - run
run_all_tests('profile','fast')after implementation - report the changed files and the verification result