Files
imdd_silas/TEST_TODO.md
2026-03-24 17:23:02 +01:00

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:

  1. Read the target class implementation in Classes/... before writing or changing tests.
  2. Read the current placeholder or existing test in Tests/....
  3. Replace or extend the existing test. Do not create duplicate test files.
  4. Use the existing matlab.unittest framework and extend IMDDTestCase.
  5. Tag new tests with TestTags.
  6. Run the relevant test entrypoint after implementation.
  7. 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.m
  • Classes/00_signals/Informationsignal.m -> Tests/00_signals/Informationsignal_test.m
  • Classes/00_signals/Electricalsignal.m -> Tests/00_signals/Electricalsignal_test.m
  • Classes/01_transmit/PAMmapper.m -> Tests/01_transmit/PAMmapper_test.m
  • Classes/01_transmit/PAMsource.m -> Tests/01_transmit/PAMsource_test.m
  • Classes/01_transmit/Pulseformer.m -> Tests/01_transmit/Pulseformer_test.m
  • Classes/02_optical/Fiber.m -> Tests/02_optical/Fiber_test.m
  • Classes/03_receive/Photodiode.m -> Tests/03_receive/Photodiode_test.m
  • Classes/03_receive/Scope.m -> Tests/03_receive/Scope_test.m
  • Classes/04_DSP/TransmissionPerformance.m -> Tests/04_DSP/TransmissionPerformance_test.m
  • Classes/04_DSP/Equalizer/FFE.m -> Tests/04_DSP/Equalizer/FFE_test.m
  • Classes/04_DSP/Sequence Detection/MLSE.m -> Tests/04_DSP/Sequence Detection/MLSE_test.m
  • Classes/04_DSP/Timing Recovery/Timing_Recovery.m -> Tests/04_DSP/Timing Recovery/T_04_DSP_Timing_Recovery_Timing_Recovery_test.m

Notes:

  • Opticalsignal_test.m still appears to be a placeholder and should be treated as unfinished.
  • There are multiple Timing_Recovery class 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:

  1. Classes/00_signals/Opticalsignal.m Tests/00_signals/Opticalsignal_test.m Focus:

    • constructor metadata wiring
    • delay
    • cspr
    • interaction with inherited signal behavior
  2. Classes/01_transmit/Signalgenerator.m Tests/01_transmit/Signalgenerator_test.m Focus:

    • constructor/config defaults
    • deterministic generation path
    • output type and shape
  3. Classes/02_etc/Filter.m Tests/02_etc/Filter_test.m Focus:

    • deterministic filter construction
    • process behavior on small signals
    • output rate/length invariants
  4. Classes/02_etc/Amplifier.m Tests/02_etc/Amplifier_test.m Focus:

    • gain behavior
    • noise-free baseline
    • output class and metadata behavior
  5. Classes/02_optical/EML.m Tests/02_optical/EML_test.m Focus:

    • deterministic modulation path
    • output class and metadata
    • small synthetic fixture only
  6. Classes/02_optical/Optical_Multiplex.m Tests/02_optical/Optical_Multiplex_test.m Focus:

    • combining channels
    • output dimensions
    • metadata handling
  7. Classes/02_optical/Optical_Demultiplex.m Tests/02_optical/Optical_Demultiplex_test.m Focus:

    • deterministic channel extraction
    • output dimensions
    • basic round-trip expectations with multiplexing if practical
  8. Classes/02_optical/Polarization_Controller.m Tests/02_optical/Polarization_Controller_test.m Focus:

    • deterministic transform behavior
    • shape preservation
  9. Classes/02_optical/DP_Fiber.m Tests/02_optical/DP_Fiber_test.m Focus:

    • 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.m Tests/04_DSP/Coding/Duobinary_test.m
  • Classes/04_DSP/Coding/MRDS_coding.m Tests/04_DSP/Coding/MRDS_coding_test.m
  • Classes/04_DSP/Sequence Detection/MLSE_viterbi.m Tests/04_DSP/Sequence Detection/MLSE_viterbi_test.m
  • Classes/04_DSP/Sequence Detection/MLSE_new.m Tests/04_DSP/Sequence Detection/MLSE_new_test.m
  • Classes/04_DSP/Timing Recovery/Time_Shifter.m Tests/04_DSP/Timing Recovery/Time_Shifter_test.m
  • Classes/04_DSP/Timing Recovery/Godard_Timing_Recovery.m Tests/04_DSP/Timing Recovery/Godard_Timing_Recovery_test.m
  • Classes/04_DSP/Timing Recovery/MaxVar_Timing_Recovery.m Tests/04_DSP/Timing Recovery/MaxVar_Timing_Recovery_test.m

Then move on to the remaining equalizer variants:

  • EQ.m
  • EQ_copy.m
  • EQ_silas*.m
  • FFE_*
  • ML_MLSE*.m
  • Postfilter.m
  • VNLE.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_Lab tests in normal agent sessions
  • run run_all_tests('profile','fast') after implementation
  • report the changed files and the verification result