7.6 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: 82 | Failed: 0 | Incomplete: 0 - explicit placeholder tests remaining:
62
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/00_signals/Opticalsignal.m->Tests/00_signals/Opticalsignal_test.mClasses/01_transmit/PAMmapper.m->Tests/01_transmit/PAMmapper_test.mClasses/01_transmit/PAMsource.m->Tests/01_transmit/PAMsource_test.mClasses/01_transmit/Signalgenerator.m->Tests/01_transmit/Signalgenerator_test.mClasses/01_transmit/Pulseformer.m->Tests/01_transmit/Pulseformer_test.mClasses/02_etc/Amplifier.m->Tests/02_etc/Amplifier_test.mClasses/02_etc/Filter.m->Tests/02_etc/Filter_test.mClasses/02_optical/Fiber.m->Tests/02_optical/Fiber_test.mClasses/02_optical/EML.m->Tests/02_optical/EML_test.mClasses/02_optical/Optical_Multiplex.m->Tests/02_optical/Optical_Multiplex_test.mClasses/02_optical/Optical_Demultiplex.m->Tests/02_optical/Optical_Demultiplex_test.mClasses/02_optical/DP_Fiber.m->Tests/02_optical/DP_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:
- 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
Integration Tests
These are the current end-to-end regression guards:
Tests/integration/IMDD_base_system_minimal_integration_test.mTests/integration/IMDD_base_system_no_impairment_integration_test.mTests/integration/IMDD_base_system_impairment_monotonicity_integration_test.mTests/integration/WDM_mux_demux_optical_chain_integration_test.mTests/integration/WDM_end_to_end_two_channel_receiver_integration_test.m
Current integration focus:
- refactor the duplicated reduced IM/DD workflow setup into shared integration helpers
- tighten the IM/DD baseline naming and thresholds so the physical intent is honest
- strengthen the WDM optical-chain and end-to-end receiver fixtures into harder regression guards
- keep all integration fixtures deterministic and small enough to remain reviewable
Remaining Core Tests
Highest-value unfinished unit tests to implement next:
-
Classes/02_optical/Polarization_Controller.mTests/02_optical/Polarization_Controller_test.mFocus:- deterministic transform behavior
- shape preservation
-
Classes/01_transmit/AWG.mTests/01_transmit/AWG_test.mFocus:- DAC-like resampling and quantization behavior
- length and sampling-rate invariants
- deterministic small fixtures
Follow-up around the WDM integration fixtures:
Classes/01_transmit/AWG.mClasses/02_optical/EML.mClasses/02_optical/Polarization_Controller.mClasses/02_optical/DP_Fiber.mClasses/02_optical/Optical_Multiplex.mClasses/02_optical/Optical_Demultiplex.mClasses/03_receive/Photodiode.m
These should be revisited together when the WDM integration tests are tightened.
Immediate integration refactor backlog:
-
Extract shared reduced IM/DD integration helpers Targets:
Tests/integration/IMDD_base_system_minimal_integration_test.mTests/integration/IMDD_base_system_no_impairment_integration_test.mTests/integration/IMDD_base_system_impairment_monotonicity_integration_test.mGoal:- remove duplicated reduced-workflow builders
- keep assertions local to each test file
-
Revisit the "no impairment" IM/DD fixture Target:
Tests/integration/IMDD_base_system_no_impairment_integration_test.mGoal:- ensure the name, comments, and thresholds reflect the actual physical regime
-
Harden the WDM optical-chain regression guards Targets:
Tests/integration/WDM_mux_demux_optical_chain_integration_test.mTests/integration/WDM_end_to_end_two_channel_receiver_integration_test.mGoal:- improve channel-separation assertions
- add propagated-chain checks where stable
- avoid brittle waveform snapshots
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