From 7b5987c5c9eb0f44ff9760ca918234937c3cd4fb Mon Sep 17 00:00:00 2001 From: Pluze Zhu Date: Fri, 5 Jun 2026 07:38:06 -0500 Subject: [PATCH] chore: align local test entrypoints --- .agents/skills/labkit-app-builder/SKILL.md | 14 +- .agents/skills/labkit-boundary-guard/SKILL.md | 12 +- .agents/skills/labkit-test-planner/SKILL.md | 24 +-- AGENTS.md | 14 +- README.md | 30 ++-- buildfile.m | 101 +++++++++++ docs/README.md | 4 +- docs/apps.md | 12 +- docs/architecture.md | 4 +- docs/dta.md | 2 +- docs/testing.md | 117 ++++++++----- docs/ui.md | 4 +- scripts/run_matlab_tests.ps1 | 147 +++++++--------- scripts/run_matlab_tests.sh | 161 ++++++++---------- tests/AGENTS.md | 2 +- ...yGuiLayoutDicTest.m => GuiLayoutDicTest.m} | 8 +- ...ochemTest.m => GuiLayoutElectrochemTest.m} | 8 +- ...Test.m => GuiLayoutImageMeasurementTest.m} | 8 +- .../{LegacyGuiSmokeTest.m => GuiSmokeTest.m} | 8 +- ...WearableTest.m => GuiLayoutWearableTest.m} | 8 +- ...t.m => GuiLayoutUiAnchorCurveEditorTest.m} | 8 +- ...hTest.m => GuiLayoutUiAxesWorkbenchTest.m} | 8 +- ...sTest.m => GuiLayoutUiBasicControlsTest.m} | 8 +- ...StateTest.m => GuiLayoutUiBusyStateTest.m} | 8 +- ...raceTest.m => GuiLayoutUiDebugTraceTest.m} | 8 +- ...st.m => GuiLayoutUiImageAxesRuntimeTest.m} | 8 +- ...lTest.m => GuiLayoutUiScaleBarPanelTest.m} | 8 +- ...olTest.m => GuiLayoutUiScaleBarToolTest.m} | 8 +- ...esTest.m => AppEntrypointBoundariesTest.m} | 8 +- ...est.m => AppOwnedWorkflowBoundariesTest.m} | 8 +- ...st.m => PackageDependencyBoundariesTest.m} | 8 +- ...rfaceTest.m => PackagePublicSurfaceTest.m} | 8 +- ...eneTest.m => SensitiveSampleHygieneTest.m} | 8 +- ...undariesTest.m => StartupBoundariesTest.m} | 8 +- ...ExportTest.m => ChronoOverlayExportTest.m} | 8 +- ...{LegacyCicExportTest.m => CicExportTest.m} | 26 +-- ...egacyComputeCICTest.m => ComputeCICTest.m} | 22 +-- ...egacyComputeCSCTest.m => ComputeCSCTest.m} | 14 +- ...stanceTest.m => ComputeVTResistanceTest.m} | 12 +- ...layExportTest.m => EisOverlayExportTest.m} | 12 +- ...eExportTest.m => VtResistanceExportTest.m} | 22 +-- ...ackFusionTest.m => FocusStackFusionTest.m} | 8 +- ...Test.m => ImageCurvatureMeasurementTest.m} | 8 +- ...tTest.m => BiosignalDelimitedImportTest.m} | 8 +- ...essingTest.m => BiosignalProcessingTest.m} | 8 +- ...tTest.m => BiosignalRecordingImportTest.m} | 8 +- ....m => BiosignalSegmentsMeasurementsTest.m} | 8 +- ...DetectionTest.m => EcgPeakDetectionTest.m} | 8 +- ...yDetectPulsesTest.m => DetectPulsesTest.m} | 14 +- ...{LegacyDtaFacadeTest.m => DtaFacadeTest.m} | 12 +- ...ionFacadeTest.m => DtaSessionFacadeTest.m} | 8 +- ...eChronoItemTest.m => MakeChronoItemTest.m} | 12 +- ...yParseCVCTDTATest.m => ParseCVCTDTATest.m} | 8 +- ...seChronoDTATest.m => ParseChronoDTATest.m} | 10 +- ...acyParseEISDTATest.m => ParseEISDTATest.m} | 12 +- ...UtilitiesTest.m => SessionUtilitiesTest.m} | 8 +- ...HookHelpersTest.m => AppHookHelpersTest.m} | 8 +- .../ui/{LegacyPlotXYTest.m => PlotXYTest.m} | 12 +- ...rationTest.m => ScaleBarCalibrationTest.m} | 8 +- 59 files changed, 586 insertions(+), 498 deletions(-) rename tests/gui/structural/apps/dic/{LegacyGuiLayoutDicTest.m => GuiLayoutDicTest.m} (92%) rename tests/gui/structural/apps/electrochem/{LegacyGuiLayoutElectrochemTest.m => GuiLayoutElectrochemTest.m} (96%) rename tests/gui/structural/apps/image_measurement/{LegacyGuiLayoutImageMeasurementTest.m => GuiLayoutImageMeasurementTest.m} (93%) rename tests/gui/structural/apps/smoke/{LegacyGuiSmokeTest.m => GuiSmokeTest.m} (93%) rename tests/gui/structural/apps/wearable/{LegacyGuiLayoutWearableTest.m => GuiLayoutWearableTest.m} (87%) rename tests/gui/structural/labkit/ui/{LegacyGuiLayoutUiAnchorCurveEditorTest.m => GuiLayoutUiAnchorCurveEditorTest.m} (95%) rename tests/gui/structural/labkit/ui/{LegacyGuiLayoutUiAxesWorkbenchTest.m => GuiLayoutUiAxesWorkbenchTest.m} (97%) rename tests/gui/structural/labkit/ui/{LegacyGuiLayoutUiBasicControlsTest.m => GuiLayoutUiBasicControlsTest.m} (98%) rename tests/gui/structural/labkit/ui/{LegacyGuiLayoutUiBusyStateTest.m => GuiLayoutUiBusyStateTest.m} (92%) rename tests/gui/structural/labkit/ui/{LegacyGuiLayoutUiDebugTraceTest.m => GuiLayoutUiDebugTraceTest.m} (95%) rename tests/gui/structural/labkit/ui/{LegacyGuiLayoutUiImageAxesRuntimeTest.m => GuiLayoutUiImageAxesRuntimeTest.m} (92%) rename tests/gui/structural/labkit/ui/{LegacyGuiLayoutUiScaleBarPanelTest.m => GuiLayoutUiScaleBarPanelTest.m} (95%) rename tests/gui/structural/labkit/ui/{LegacyGuiLayoutUiScaleBarToolTest.m => GuiLayoutUiScaleBarToolTest.m} (96%) rename tests/integration/project/{LegacyAppEntrypointBoundariesTest.m => AppEntrypointBoundariesTest.m} (92%) rename tests/integration/project/{LegacyAppOwnedWorkflowBoundariesTest.m => AppOwnedWorkflowBoundariesTest.m} (97%) rename tests/integration/project/{LegacyPackageDependencyBoundariesTest.m => PackageDependencyBoundariesTest.m} (92%) rename tests/integration/project/{LegacyPackagePublicSurfaceTest.m => PackagePublicSurfaceTest.m} (96%) rename tests/integration/project/{LegacySensitiveSampleHygieneTest.m => SensitiveSampleHygieneTest.m} (93%) rename tests/integration/project/{LegacyStartupBoundariesTest.m => StartupBoundariesTest.m} (93%) rename tests/unit/apps/electrochem/{LegacyChronoOverlayExportTest.m => ChronoOverlayExportTest.m} (94%) rename tests/unit/apps/electrochem/{LegacyCicExportTest.m => CicExportTest.m} (83%) rename tests/unit/apps/electrochem/{LegacyComputeCICTest.m => ComputeCICTest.m} (87%) rename tests/unit/apps/electrochem/{LegacyComputeCSCTest.m => ComputeCSCTest.m} (92%) rename tests/unit/apps/electrochem/{LegacyComputeVTResistanceTest.m => ComputeVTResistanceTest.m} (90%) rename tests/unit/apps/electrochem/{LegacyEisOverlayExportTest.m => EisOverlayExportTest.m} (91%) rename tests/unit/apps/electrochem/{LegacyVtResistanceExportTest.m => VtResistanceExportTest.m} (86%) rename tests/unit/apps/image_measurement/{LegacyFocusStackFusionTest.m => FocusStackFusionTest.m} (97%) rename tests/unit/apps/image_measurement/{LegacyImageCurvatureMeasurementTest.m => ImageCurvatureMeasurementTest.m} (96%) rename tests/unit/labkit/biosignal/{LegacyBiosignalDelimitedImportTest.m => BiosignalDelimitedImportTest.m} (96%) rename tests/unit/labkit/biosignal/{LegacyBiosignalProcessingTest.m => BiosignalProcessingTest.m} (90%) rename tests/unit/labkit/biosignal/{LegacyBiosignalRecordingImportTest.m => BiosignalRecordingImportTest.m} (84%) rename tests/unit/labkit/biosignal/{LegacyBiosignalSegmentsMeasurementsTest.m => BiosignalSegmentsMeasurementsTest.m} (88%) rename tests/unit/labkit/biosignal/{LegacyEcgPeakDetectionTest.m => EcgPeakDetectionTest.m} (94%) rename tests/unit/labkit/dta/{LegacyDetectPulsesTest.m => DetectPulsesTest.m} (92%) rename tests/unit/labkit/dta/{LegacyDtaFacadeTest.m => DtaFacadeTest.m} (96%) rename tests/unit/labkit/dta/{LegacyDtaSessionFacadeTest.m => DtaSessionFacadeTest.m} (93%) rename tests/unit/labkit/dta/{LegacyMakeChronoItemTest.m => MakeChronoItemTest.m} (82%) rename tests/unit/labkit/dta/{LegacyParseCVCTDTATest.m => ParseCVCTDTATest.m} (93%) rename tests/unit/labkit/dta/{LegacyParseChronoDTATest.m => ParseChronoDTATest.m} (93%) rename tests/unit/labkit/dta/{LegacyParseEISDTATest.m => ParseEISDTATest.m} (87%) rename tests/unit/labkit/dta/{LegacySessionUtilitiesTest.m => SessionUtilitiesTest.m} (89%) rename tests/unit/labkit/ui/{LegacyAppHookHelpersTest.m => AppHookHelpersTest.m} (96%) rename tests/unit/labkit/ui/{LegacyPlotXYTest.m => PlotXYTest.m} (89%) rename tests/unit/labkit/ui/{LegacyScaleBarCalibrationTest.m => ScaleBarCalibrationTest.m} (87%) diff --git a/.agents/skills/labkit-app-builder/SKILL.md b/.agents/skills/labkit-app-builder/SKILL.md index daa431f..e7aa027 100644 --- a/.agents/skills/labkit-app-builder/SKILL.md +++ b/.agents/skills/labkit-app-builder/SKILL.md @@ -117,15 +117,15 @@ Build the app in this order: ## Validation -Use `labkit-test-planner` to choose suites. Common checks: +Use `labkit-test-planner` to choose build tasks. Common checks: ```bash -scripts/run_matlab_tests.sh --suite project -scripts/run_matlab_tests.sh --suite apps/electrochem -scripts/run_matlab_tests.sh --suite apps/dic --gui -scripts/run_matlab_tests.sh --suite apps/image_measurement --gui -scripts/run_matlab_tests.sh --suite apps/wearable --gui -scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui +buildtool testProject +buildtool testAppsElectrochem +buildtool testAppsDicGui +buildtool testAppsImageMeasurementGui +buildtool testAppsWearableGui +buildtool testLabkitUiGui testAppsGui ``` For reusable facade changes, also use `labkit-boundary-guard`. diff --git a/.agents/skills/labkit-boundary-guard/SKILL.md b/.agents/skills/labkit-boundary-guard/SKILL.md index 9cb7ea9..f1cf6bb 100644 --- a/.agents/skills/labkit-boundary-guard/SKILL.md +++ b/.agents/skills/labkit-boundary-guard/SKILL.md @@ -42,16 +42,16 @@ For UI boundary work, prefer `labkit.ui.app.createShell`, `labkit.ui.app.dispatc Always run or recommend: ```bash -scripts/run_matlab_tests.sh --suite project +buildtool testProject ``` -Add focused suites by touched boundary: +Add focused tasks by touched boundary: ```bash -scripts/run_matlab_tests.sh --suite labkit/dta --suite apps/electrochem -scripts/run_matlab_tests.sh --suite labkit/biosignal --suite apps/wearable -scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui -scripts/run_matlab_tests.sh --suite apps/electrochem +buildtool testLabkitDta testAppsElectrochem +buildtool testLabkitBiosignal testAppsWearableGui +buildtool testLabkitUiGui testAppsGui +buildtool testAppsElectrochem ``` If MATLAB is unavailable, report that clearly and do not claim tests passed. diff --git a/.agents/skills/labkit-test-planner/SKILL.md b/.agents/skills/labkit-test-planner/SKILL.md index 049d31b..a7d9853 100644 --- a/.agents/skills/labkit-test-planner/SKILL.md +++ b/.agents/skills/labkit-test-planner/SKILL.md @@ -1,6 +1,6 @@ --- name: labkit-test-planner -description: "Use for LabKit validation planning, running tests, pre-commit checks, MATLAB source/test/fixture changes, or deciding which suite to run. Trigger on validate, test plan, before commit, CI, GUI check, parser regression, fixture, or sample hygiene work." +description: "Use for LabKit validation planning, running tests, pre-commit checks, MATLAB source/test/fixture changes, or deciding which build task to run. Trigger on validate, test plan, before commit, CI, GUI check, parser regression, fixture, or sample hygiene work." --- # LabKit Test Planner @@ -16,7 +16,7 @@ Choose visible, source-aligned validation without overstating coverage. 3. `docs/testing.md` 4. touched source, tests, and fixture files -## Suite Routing +## Task Routing Use the smallest set that covers the touched boundary: @@ -24,32 +24,32 @@ Use the smallest set that covers the touched boundary: project startup, architecture, package surface, sample-data hygiene labkit/dta DTA parser, facade, session, item, pulse behavior labkit/biosignal biosignal import, processing, ECG peaks, segments, measurements -labkit/ui reusable UI helpers; add --gui for layout/callback/shell/debug checks +labkit/ui reusable UI helpers; use testLabkitUiGui for layout/callback/shell/debug checks apps/electrochem electrochem app-owned calculations, exports, layout -apps/dic DIC app layout; usually --gui +apps/dic DIC app layout; usually testAppsDicGui apps/image_measurement image measurement calculations, exports, layout -apps/wearable wearable app layout; usually --gui +apps/wearable wearable app layout; usually testAppsWearableGui apps/smoke cross-app noninteractive launch checks ``` Pair reusable changes with downstream apps when the app-facing contract could be affected: ```bash -scripts/run_matlab_tests.sh --suite labkit/dta --suite apps/electrochem -scripts/run_matlab_tests.sh --suite labkit/biosignal --suite apps/wearable -scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui +buildtool testLabkitDta testAppsElectrochem +buildtool testLabkitBiosignal testAppsWearableGui +buildtool testLabkitUiGui testAppsGui ``` -Use the default non-GUI suite for broad changes: +Use the default non-GUI build task for broad changes: ```bash -scripts/run_matlab_tests.sh +buildtool test ``` On Windows, use: ```powershell -powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 --suite project +powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 testProject ``` ## GUI Claims @@ -68,4 +68,4 @@ Report: - automated tests run and pass/fail result - GUI/manual validation status - unverified behavior -- why any relevant suite was not run +- why any relevant task was not run diff --git a/AGENTS.md b/AGENTS.md index a29537f..6d6683e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -78,22 +78,22 @@ When using local lab files to reproduce a bug: ## Validation -Run relevant automated checks after executable MATLAB, test, fixture, package, or validation-rule changes. Use focused checks during iteration and the default non-GUI suite for broad changes. +Run relevant automated checks after executable MATLAB, test, fixture, package, or validation-rule changes. Use focused checks during iteration and the default non-GUI build task for broad changes. Common commands: ```bash -scripts/run_matlab_tests.sh --suite project -scripts/run_matlab_tests.sh --suite labkit/dta -scripts/run_matlab_tests.sh --suite labkit/biosignal -scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui -scripts/run_matlab_tests.sh +buildtool testProject +buildtool testLabkitDta +buildtool testLabkitBiosignal +buildtool testLabkitUiGui testAppsGui +buildtool test ``` On Windows PowerShell: ```powershell -powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 --suite project +powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 testProject matlab -batch "buildtool checkProject" matlab -batch "buildtool packageDryRun" ``` diff --git a/README.md b/README.md index ccc4eb0..41b08cf 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Workflow-specific calculations, plot choices, summaries, and exports stay in the | Image measurement | Interactive curve tracing, calibrated scale/length measurement, curvature/radius measurement, and microscope focus stacking | | Wearable biosignals | ECG preview, filtering, peak detection, segments, templates, and SNR-style measurements | | Reusable foundation | Layered MATLAB UI foundation plus DTA and biosignal facades for app-facing workflows | -| Validation | Focused MATLAB suites, architecture guardrails, synthetic fixtures, and GitHub Actions CI | +| Validation | Focused MATLAB build tasks, architecture guardrails, synthetic fixtures, and GitHub Actions CI | ## Quick Start @@ -80,35 +80,35 @@ Status labels: ## Tests -Run the default non-GUI MATLAB suite: +Run the default non-GUI MATLAB build task: ```bash -scripts/run_matlab_tests.sh +buildtool test ``` -On Windows PowerShell: +The local scripts are optional wrappers around build tasks: ```powershell -.\scripts\run_matlab_tests.ps1 +.\scripts\run_matlab_tests.ps1 test ``` Focused checks are available during development: ```bash +buildtool checkStyle buildtool checkProject buildtool packageDryRun -scripts/run_matlab_tests.sh --suite labkit/dta -scripts/run_matlab_tests.sh --suite labkit/biosignal -scripts/run_matlab_tests.sh --suite apps/wearable --gui -scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui +buildtool testLabkitDta +buildtool testLabkitBiosignal +buildtool testAppsWearableGui +buildtool testLabkitUiGui testAppsGui ``` -The Windows script accepts the same `--suite`, `--test`, and `--gui` options. -`buildtool checkProject` verifies the MATLAB Project path/startup metadata, and -`buildtool packageDryRun` checks package boundaries without exporting a toolbox. -GitHub Actions runs quality, unit/coverage, and integration jobs on pushes and -pull requests to `main`; manual and scheduled runs also cover GUI structural and -non-blocking gesture jobs. +Script arguments are build task names; selector flags such as `--suite`, +`--test`, and `--gui` are not supported. GitHub Actions runs quality, +unit/coverage, and integration jobs on pushes and pull requests to `main`; +manual and scheduled runs also cover GUI structural and non-blocking gesture +jobs. ## Repository Layout diff --git a/buildfile.m b/buildfile.m index 456521e..51a8099 100644 --- a/buildfile.m +++ b/buildfile.m @@ -8,6 +8,19 @@ plan("test").Description = "Run the full non-GUI test entry point."; plan("testUnit").Description = "Run official unit tests."; plan("testIntegration").Description = "Run official integration tests."; + plan("testProject").Description = "Run project guardrails."; + plan("testLabkitDta").Description = "Run DTA facade/parser tests."; + plan("testLabkitBiosignal").Description = "Run biosignal facade tests."; + plan("testLabkitUi").Description = "Run reusable UI non-GUI tests."; + plan("testLabkitUiGui").Description = "Run reusable UI GUI tests."; + plan("testAppsElectrochem").Description = "Run electrochem app non-GUI tests."; + plan("testAppsElectrochemGui").Description = "Run electrochem app GUI tests."; + plan("testAppsDicGui").Description = "Run DIC app GUI tests."; + plan("testAppsImageMeasurement").Description = "Run image-measurement app non-GUI tests."; + plan("testAppsImageMeasurementGui").Description = "Run image-measurement app GUI tests."; + plan("testAppsWearableGui").Description = "Run wearable app GUI tests."; + plan("testAppsGui").Description = "Run all app GUI tests."; + plan("testAppsSmokeGui").Description = "Run cross-app GUI smoke tests."; plan("testGuiStructural").Description = "Run noninteractive GUI structural tests."; plan("testGuiGesture").Description = "Run noninteractive/manual GUI gesture tests."; plan("coverage").Description = "Run official tests with coverage artifacts."; @@ -40,6 +53,94 @@ function testIntegrationTask(~) "FailIfNoTests", false); end +function testProjectTask(~) + runBuildTests("testProject", ... + "Suites", "project", ... + "FailIfNoTests", false); +end + +function testLabkitDtaTask(~) + runBuildTests("testLabkitDta", ... + "Suites", "labkit/dta", ... + "FailIfNoTests", false); +end + +function testLabkitBiosignalTask(~) + runBuildTests("testLabkitBiosignal", ... + "Suites", "labkit/biosignal", ... + "FailIfNoTests", false); +end + +function testLabkitUiTask(~) + runBuildTests("testLabkitUi", ... + "Suites", "labkit/ui", ... + "IncludeGui", false, ... + "FailIfNoTests", false); +end + +function testLabkitUiGuiTask(~) + runBuildTests("testLabkitUiGui", ... + "Suites", "labkit/ui", ... + "IncludeGui", true, ... + "FailIfNoTests", false); +end + +function testAppsElectrochemTask(~) + runBuildTests("testAppsElectrochem", ... + "Suites", "apps/electrochem", ... + "IncludeGui", false, ... + "FailIfNoTests", false); +end + +function testAppsElectrochemGuiTask(~) + runBuildTests("testAppsElectrochemGui", ... + "Suites", "apps/electrochem", ... + "IncludeGui", true, ... + "FailIfNoTests", false); +end + +function testAppsDicGuiTask(~) + runBuildTests("testAppsDicGui", ... + "Suites", "apps/dic", ... + "IncludeGui", true, ... + "FailIfNoTests", false); +end + +function testAppsImageMeasurementTask(~) + runBuildTests("testAppsImageMeasurement", ... + "Suites", "apps/image_measurement", ... + "IncludeGui", false, ... + "FailIfNoTests", false); +end + +function testAppsImageMeasurementGuiTask(~) + runBuildTests("testAppsImageMeasurementGui", ... + "Suites", "apps/image_measurement", ... + "IncludeGui", true, ... + "FailIfNoTests", false); +end + +function testAppsWearableGuiTask(~) + runBuildTests("testAppsWearableGui", ... + "Suites", "apps/wearable", ... + "IncludeGui", true, ... + "FailIfNoTests", false); +end + +function testAppsGuiTask(~) + runBuildTests("testAppsGui", ... + "Suites", "apps", ... + "IncludeGui", true, ... + "FailIfNoTests", false); +end + +function testAppsSmokeGuiTask(~) + runBuildTests("testAppsSmokeGui", ... + "Suites", "apps/smoke", ... + "IncludeGui", true, ... + "FailIfNoTests", false); +end + function testGuiStructuralTask(~) runBuildTests("testGuiStructural", ... "Suites", "gui", ... diff --git a/docs/README.md b/docs/README.md index 2bcadff..7b1180f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,7 +11,7 @@ These docs are written for people who run, maintain, or extend LabKit. Start wit - `apps.md`: app ownership, current app notes, new-app checklist, and validation guidance. - `ui.md`: shared GUI shell, tabs, panels, axes, and reusable UI helper contracts. -- `testing.md`: focused app-suite and GUI structural test commands. +- `testing.md`: focused app and GUI structural build-task commands. ## I Work On Reusable APIs @@ -22,7 +22,7 @@ These docs are written for people who run, maintain, or extend LabKit. Start wit ## I Need Validation Guidance -- `testing.md`: default suite, focused suites, GUI versus non-GUI checks, fixture expectations, and CI scope. +- `testing.md`: default and focused build tasks, GUI versus non-GUI checks, fixture expectations, and CI scope. ## Component Reference diff --git a/docs/apps.md b/docs/apps.md index b99abbc..345fa53 100644 --- a/docs/apps.md +++ b/docs/apps.md @@ -106,13 +106,15 @@ Start from the closest existing app, reduce it to the needed workflow, and prese ## Validation -Pure app calculations, export table construction, and plotting helpers belong in the app-family suites and run in the default non-GUI workflow when they do not require graphics. Add `--gui` for noninteractive launch/layout checks: +Pure app calculations, export table construction, and plotting helpers belong +in app-family build tasks. Use the GUI tasks for noninteractive launch/layout +checks: ```bash -scripts/run_matlab_tests.sh --suite apps/electrochem --gui -scripts/run_matlab_tests.sh --suite apps/dic --gui -scripts/run_matlab_tests.sh --suite apps/image_measurement --gui -scripts/run_matlab_tests.sh --suite apps/wearable --gui +buildtool testAppsElectrochem testAppsElectrochemGui +buildtool testAppsDicGui +buildtool testAppsImageMeasurement testAppsImageMeasurementGui +buildtool testAppsWearableGui ``` Interactive file selection, drawing, visual inspection, and full workflow feel are validated manually in MATLAB app windows. diff --git a/docs/architecture.md b/docs/architecture.md index 8d12a70..8196689 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -107,9 +107,9 @@ Private helpers may keep shorter comments, but should still identify expected ca ## Validation Boundary -The default automated validation boundary is the non-GUI MATLAB suite: project architecture checks, `labkit` facade/parser checks, and pure app analysis/export checks. GitHub Actions runs that suite on pushes and pull requests to `main`. +The default automated validation boundary is the non-GUI MATLAB build task: project architecture checks, `labkit` facade/parser checks, and pure app analysis/export checks. GitHub Actions runs that task on pushes and pull requests to `main`. -GUI launch/layout checks live in source-aligned suites and are enabled with `--gui`. Interactive GUI workflows are validated manually in MATLAB app windows. +GUI launch/layout checks live in source-aligned build tasks such as `testLabkitUiGui` and `testAppsGui`. Interactive GUI workflows are validated manually in MATLAB app windows. ## Current Package Surface diff --git a/docs/dta.md b/docs/dta.md index 7b28c48..45ffacc 100644 --- a/docs/dta.md +++ b/docs/dta.md @@ -64,7 +64,7 @@ Pulse detection: Lower-level recursive discovery, parser functions, item construction, session mutation, and pulse internals are private DTA implementation details. -The DTA facade and parser fixture checks run in the default GitHub Actions workflow as part of the non-GUI MATLAB suite. +The DTA facade and parser fixture checks run in the default GitHub Actions workflow through the non-GUI MATLAB build task. ## Parser Assumptions diff --git a/docs/testing.md b/docs/testing.md index 3da6c58..08c9b44 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -19,6 +19,19 @@ buildtool checkStyle buildtool test buildtool testUnit buildtool testIntegration +buildtool testProject +buildtool testLabkitDta +buildtool testLabkitBiosignal +buildtool testLabkitUi +buildtool testLabkitUiGui +buildtool testAppsElectrochem +buildtool testAppsElectrochemGui +buildtool testAppsDicGui +buildtool testAppsImageMeasurement +buildtool testAppsImageMeasurementGui +buildtool testAppsWearableGui +buildtool testAppsGui +buildtool testAppsSmokeGui buildtool testGuiStructural buildtool testGuiGesture buildtool coverage @@ -36,34 +49,35 @@ buildtool packageDryRun - `buildtool packageDryRun` writes a package-boundary inventory under `artifacts/package/` without exporting a toolbox. -Default non-GUI suite: +Default non-GUI build task: ```bash -scripts/run_matlab_tests.sh +buildtool test ``` On Windows PowerShell: ```powershell -.\scripts\run_matlab_tests.ps1 +.\scripts\run_matlab_tests.ps1 test ``` If local execution policy blocks direct `.ps1` execution, run: ```powershell -powershell -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 +powershell -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 test ``` -Both wrappers call `tests/runLabKitTests.m` and accept the same `--suite`, -`--test`, and `--gui` options. Set `MATLAB_CMD` when MATLAB is not on `PATH`, -and set `MATLAB_TEST_LOG` to override the default `matlab_test.log` location. +Both wrappers accept build task names only and call `buildtool`. Selector flags +such as `--suite`, `--test`, and `--gui` are not supported. Set `MATLAB_CMD` +when MATLAB is not on `PATH`, set `MATLAB_FLAGS` for MATLAB startup flags, and +set `MATLAB_TEST_LOG` to override the default `matlab_test.log` location. ## Validation Levels | Level | Where | Purpose | | --- | --- | --- | -| Default non-GUI suite | CI and local shell | Project guardrails, `labkit` facade behavior, non-GUI reusable UI checks, and pure app analysis/export helpers. | -| Focused GUI suite runs | Local MATLAB with graphics support | Noninteractive launch, layout, and callback wiring checks for selected app families. | +| Default non-GUI build task | CI and local shell | Project guardrails, `labkit` facade behavior, non-GUI reusable UI checks, and pure app analysis/export helpers. | +| Focused GUI build tasks | Local MATLAB with graphics support | Noninteractive launch, layout, and callback wiring checks for selected app families. | | Manual GUI validation | User-run app windows | Interactive file selection, drawing, visual inspection, and full workflow feel. | CI runs quality, unit/coverage, and integration jobs on pushes and pull @@ -71,59 +85,68 @@ requests to `main` through `.github/workflows/matlab-tests.yml`. Manual and scheduled CI runs also execute GUI structural and non-blocking GUI gesture jobs. Do not describe CI as full interactive GUI workflow validation. -## Focused Suites +## Focused Build Tasks ```bash -scripts/run_matlab_tests.sh --suite project -scripts/run_matlab_tests.sh --suite labkit/dta -scripts/run_matlab_tests.sh --suite labkit/dta --suite apps/electrochem -scripts/run_matlab_tests.sh --suite labkit/biosignal -scripts/run_matlab_tests.sh --suite labkit/biosignal --suite apps/wearable --gui -scripts/run_matlab_tests.sh --suite labkit/ui --gui -scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui -scripts/run_matlab_tests.sh --suite apps/electrochem -scripts/run_matlab_tests.sh --suite apps/dic --gui -scripts/run_matlab_tests.sh --suite apps/image_measurement --gui -scripts/run_matlab_tests.sh --suite apps/wearable --gui -scripts/run_matlab_tests.sh --suite gui -scripts/run_matlab_tests.sh --test test_gui_layout_ui_anchor_curve_editor -scripts/run_matlab_tests.sh --test test_package_public_surface +buildtool testProject +buildtool testLabkitDta +buildtool testLabkitDta testAppsElectrochem +buildtool testLabkitBiosignal +buildtool testLabkitBiosignal testAppsWearableGui +buildtool testLabkitUiGui +buildtool testLabkitUiGui testAppsGui +buildtool testAppsElectrochem +buildtool testAppsDicGui +buildtool testAppsImageMeasurementGui +buildtool testAppsWearableGui +buildtool testAppsGui +buildtool testAppsSmokeGui +buildtool testGuiStructural +buildtool testGuiGesture ``` -Use the same option names from Windows PowerShell: +Use task names from Windows PowerShell: ```powershell -.\scripts\run_matlab_tests.ps1 --suite labkit/dta -.\scripts\run_matlab_tests.ps1 --suite apps/electrochem -.\scripts\run_matlab_tests.ps1 --test test_gui_layout_ui_anchor_curve_editor +.\scripts\run_matlab_tests.ps1 testLabkitDta +.\scripts\run_matlab_tests.ps1 testAppsElectrochem +.\scripts\run_matlab_tests.ps1 testGuiStructural ``` -Suite targets mirror source ownership: +Focused build tasks mirror source ownership: -| Suite | Use it for | +| Task | Use it for | | --- | --- | -| `project` | Startup, architecture, package surface, and sample-data hygiene guardrails. | -| `labkit/dta` | DTA parser, facade, session, pulse, and item-schema checks. | -| `labkit/biosignal` | Biosignal import, channel extraction, processing, ECG peaks, segments, SNR, and group comparison. | -| `labkit/ui` | Reusable UI helpers; add `--gui` for layout and callback wiring checks. | -| `apps/electrochem` | Electrochem app-owned calculations, exports, and layout contracts. | -| `apps/dic` | DIC app layout contracts; usually run with `--gui`. | -| `apps/image_measurement` | Image-measurement calculations, exports, and layout contracts. | -| `apps/wearable` | Wearable app layout contracts; usually run with `--gui`. | -| `apps/smoke` | Cross-app launch smoke checks. | -| `gui` | All noninteractive GUI checks across every target. | - -For reusable library changes, add downstream app suites when the app-facing contract could be affected. For example, pair `labkit/dta` with `apps/electrochem`, `labkit/biosignal` with `apps/wearable`, and `labkit/ui` with `apps` plus `--gui` when layout or callback behavior changed. +| `testProject` | Startup, architecture, package surface, and sample-data hygiene guardrails. | +| `testLabkitDta` | DTA parser, facade, session, pulse, and item-schema checks. | +| `testLabkitBiosignal` | Biosignal import, channel extraction, processing, ECG peaks, segments, SNR, and group comparison. | +| `testLabkitUi` | Reusable UI helpers that do not require app windows. | +| `testLabkitUiGui` | Reusable UI layout, callback wiring, diagnostics, and tool GUI checks. | +| `testAppsElectrochem` | Electrochem app-owned calculations and exports. | +| `testAppsElectrochemGui` | Electrochem app layout contracts. | +| `testAppsDicGui` | DIC app layout contracts. | +| `testAppsImageMeasurement` | Image-measurement calculations and exports. | +| `testAppsImageMeasurementGui` | Image-measurement layout contracts. | +| `testAppsWearableGui` | Wearable app layout contracts. | +| `testAppsGui` | All app-family noninteractive GUI checks. | +| `testAppsSmokeGui` | Cross-app launch smoke checks. | +| `testGuiStructural` | All structural GUI checks. | +| `testGuiGesture` | Runtime, anchor-editor, and scale-bar gesture checks. | + +For reusable library changes, add downstream app tasks when the app-facing +contract could be affected. For example, pair `testLabkitDta` with +`testAppsElectrochem`, `testLabkitBiosignal` with `testAppsWearableGui`, and +`testLabkitUiGui` with `testAppsGui` when layout or callback behavior changed. UI framework changes should cover the affected layer rather than only the changed file: | UI layer | Automated coverage | | --- | --- | -| Public surface | `project` suite checks the layered `labkit.ui.app/view/tool/diag` API and private implementation packages. | -| Shell/layout | `labkit/ui --gui` and affected app-family `--gui` suites. | -| Runtime/tools | `labkit/ui --gui` runtime, anchor-editor, and scale-bar tool tests. | -| Diagnostics | `labkit/ui --gui` debug instrumentation tests plus `apps/smoke --gui` debug launch trace checks. | -| App migration | Affected `apps/ --gui` suite plus `project` entrypoint/boundary guardrails. | +| Public surface | `testProject` checks the layered `labkit.ui.app/view/tool/diag` API and private implementation packages. | +| Shell/layout | `testLabkitUiGui` and affected app-family GUI tasks. | +| Runtime/tools | `testLabkitUiGui` runtime, anchor-editor, and scale-bar tool tests. | +| Diagnostics | `testLabkitUiGui` debug instrumentation tests plus `testAppsSmokeGui` debug launch trace checks. | +| App migration | Affected app-family GUI task plus `testProject` entrypoint/boundary guardrails. | | Gesture tools | `buildtool testGuiGesture` for runtime, anchor-editor, and scale-bar lifecycle checks. | ## Suite Layout diff --git a/docs/ui.md b/docs/ui.md index 7668cd5..98f921a 100644 --- a/docs/ui.md +++ b/docs/ui.md @@ -166,8 +166,8 @@ All `setX(value)` style APIs should no-op when the requested value is already cu Reusable UI contracts are covered by: ```bash -scripts/run_matlab_tests.sh --suite labkit/ui --gui -scripts/run_matlab_tests.sh --suite project +buildtool testLabkitUi testLabkitUiGui +buildtool testProject ``` Automated GUI tests validate launch, layout, callback wiring, and trace plumbing. Full interactive drawing, file selection, visual inspection, and workflow feel still require manual MATLAB GUI validation. diff --git a/scripts/run_matlab_tests.ps1 b/scripts/run_matlab_tests.ps1 index 058790d..ee2cf59 100644 --- a/scripts/run_matlab_tests.ps1 +++ b/scripts/run_matlab_tests.ps1 @@ -1,39 +1,61 @@ <# .SYNOPSIS -Runs the LabKit MATLAB test suite from Windows PowerShell. +Runs LabKit MATLAB build tasks from Windows PowerShell. .DESCRIPTION -This is the Windows-native wrapper for tests/runLabKitTests.m. It runs the -official matlab.unittest and matlab.uitest suites. +This is the Windows-native wrapper for the LabKit build task entry points. +With no task arguments it runs `buildtool test`. Positional arguments are passed +as build task names, for example `checkStyle` or `testUnit coverage`. #> $ErrorActionPreference = 'Stop' $RootDir = Resolve-Path (Join-Path $PSScriptRoot '..') -$IncludeGui = $false -$Suites = @() -$Tests = @() +$Tasks = @() function Show-Usage { @' -Usage: .\scripts\run_matlab_tests.ps1 [--gui] [--suite NAME] [--test NAME] - -Runs the default non-GUI MATLAB tests. - -Options: - --gui Also include optional noninteractive GUI launch/layout tests. - This mode requires MATLAB graphics/uifigure support. - --suite NAME Run only a suite target, for example labkit/dta or apps/electrochem. - Repeatable. The special gui target selects all GUI tests. - --test NAME Run only a test function, for example test_gui_layout_ui_anchor_curve_editor. - Repeatable. test_gui_* automatically uses GUI MATLAB flags. - -h, --help Show this help text. +Usage: .\scripts\run_matlab_tests.ps1 [TASK ...] + +Runs LabKit MATLAB build tasks. With no TASK arguments, runs `buildtool test`. + +Examples: + .\scripts\run_matlab_tests.ps1 + .\scripts\run_matlab_tests.ps1 checkStyle + .\scripts\run_matlab_tests.ps1 testUnit coverage + .\scripts\run_matlab_tests.ps1 testGuiStructural + +Common tasks: + checkStyle + test + testUnit + testIntegration + testProject + testLabkitDta + testLabkitBiosignal + testLabkitUi + testLabkitUiGui + testAppsElectrochem + testAppsElectrochemGui + testAppsDicGui + testAppsImageMeasurement + testAppsImageMeasurementGui + testAppsWearableGui + testAppsGui + testAppsSmokeGui + testGuiStructural + testGuiGesture + coverage + checkProject + packageDryRun + +Removed interface: + --suite, --test, and --gui are no longer supported. Use build task names. Environment: - MATLAB_CMD Optional path or command name for MATLAB. - MATLAB_FLAGS Optional flags for non-GUI runs. Defaults to no extra flags on Windows. - MATLAB_GUI_FLAGS Optional flags for GUI runs. Defaults to no extra flags. - MATLAB_TEST_LOG Optional log path. Defaults to .\matlab_test.log. + MATLAB_CMD Optional path or command name for MATLAB. + MATLAB_FLAGS Optional MATLAB flags for every run. + MATLAB_TEST_LOG Optional log path. Defaults to .\matlab_test.log. '@ } @@ -50,43 +72,21 @@ function Fail-Usage { for ($i = 0; $i -lt $args.Count; $i++) { $arg = [string] $args[$i] - switch ($arg) { - { $_ -in @('--gui', '-gui') } { - $IncludeGui = $true - continue - } - { $_ -in @('--suite', '-suite') } { - if ($i + 1 -ge $args.Count) { - Fail-Usage '--suite requires a value.' - } - $i++ - $suite = [string] $args[$i] - $Suites += $suite - if ($suite.ToLowerInvariant() -eq 'gui') { - $IncludeGui = $true - } - continue - } - { $_ -in @('--test', '-test') } { - if ($i + 1 -ge $args.Count) { - Fail-Usage '--test requires a value.' - } - $i++ - $testName = [string] $args[$i] - $Tests += $testName - if ($testName.ToLowerInvariant().StartsWith('test_gui_')) { - $IncludeGui = $true - } - continue - } - { $_ -in @('-h', '--help') } { - Show-Usage - exit 0 - } - default { - Fail-Usage "Unknown option: $arg" - } + if ($arg -in @('-h', '--help')) { + Show-Usage + exit 0 + } + if ($arg.StartsWith('-')) { + Fail-Usage "Unsupported option: $arg. Use build task names such as checkStyle, test, or testGuiStructural." } + if ($arg -notmatch '^[A-Za-z][A-Za-z0-9_]*$') { + Fail-Usage "Invalid build task name: $arg" + } + $Tasks += $arg +} + +if ($Tasks.Count -eq 0) { + $Tasks = @('test') } function Find-Matlab { @@ -137,22 +137,6 @@ function ConvertTo-MatlabStringLiteral { return "'" + ($Value -replace "'", "''") + "'" } -function ConvertTo-MatlabCell { - param( - [string[]] $Values - ) - - if ($null -eq $Values -or $Values.Count -eq 0) { - return '{}' - } - - $quoted = @() - foreach ($value in $Values) { - $quoted += ConvertTo-MatlabStringLiteral $value - } - return '{' + ($quoted -join ',') + '}' -} - function Split-MatlabFlags { param( [string] $Flags @@ -178,19 +162,14 @@ $logFile = if (-not [string]::IsNullOrWhiteSpace($env:MATLAB_TEST_LOG)) { Join-Path $rootPath 'matlab_test.log' } -$suiteCell = ConvertTo-MatlabCell $Suites -$testCell = ConvertTo-MatlabCell $Tests -$includeGuiText = if ($IncludeGui) { 'true' } else { 'false' } -$selectionExpr = "struct('suites', {$suiteCell}, 'tests', {$testCell})" -$testExpr = "runLabKitTests('IncludeGui', $includeGuiText, 'Suites', $suiteCell, 'Tests', $testCell, 'FailIfNoTests', false);" -$matlabCommand = "cd($(ConvertTo-MatlabStringLiteral $rootPath)); addpath(fullfile(pwd, 'tests')); $testExpr" - -$flagSource = if ($IncludeGui) { $env:MATLAB_GUI_FLAGS } else { $env:MATLAB_FLAGS } -$matlabArgs = @(Split-MatlabFlags $flagSource) +$taskText = $Tasks -join ' ' +$matlabCommand = "cd($(ConvertTo-MatlabStringLiteral $rootPath)); buildtool $taskText;" +$matlabArgs = @(Split-MatlabFlags $env:MATLAB_FLAGS) $matlabArgs += @('-logfile', $logFile, '-batch', $matlabCommand) Write-Host "Using MATLAB: $MatlabBin" Write-Host "Project root: $rootPath" +Write-Host "Build tasks: $taskText" Write-Host "MATLAB log: $logFile" if (Test-Path -LiteralPath $logFile) { @@ -201,7 +180,7 @@ if (Test-Path -LiteralPath $logFile) { $status = $LASTEXITCODE if ($status -eq 0) { - Write-Host "MATLAB tests completed successfully. Log: $logFile" + Write-Host "MATLAB build tasks completed successfully. Log: $logFile" } elseif (Test-Path -LiteralPath $logFile) { Get-Content -LiteralPath $logFile -Raw } else { diff --git a/scripts/run_matlab_tests.sh b/scripts/run_matlab_tests.sh index 9f70318..a83c618 100755 --- a/scripts/run_matlab_tests.sh +++ b/scripts/run_matlab_tests.sh @@ -2,72 +2,81 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -INCLUDE_GUI=0 -SUITES=() -TESTS=() +TASKS=() usage() { cat <<'USAGE' -Usage: scripts/run_matlab_tests.sh [--gui] [--suite NAME] [--test NAME] - -Runs the default pure-function MATLAB tests. - -Options: - --gui Also include optional noninteractive GUI launch/layout tests. - This mode requires MATLAB graphics/uifigure support and does not - use the default headless -nojvm/-nodisplay/-noFigureWindows flags. - --suite NAME Run only a suite target, for example labkit/dta or apps/electrochem. Repeatable. - Suite targets mirror official tests/unit, tests/integration, - and tests/gui ownership; parent targets such as labkit or apps - include child suites. - The special gui target selects all GUI tests. - --test NAME Run only a test function, for example test_gui_layout_ui_anchor_curve_editor. - Repeatable. test_gui_* automatically uses GUI MATLAB flags. +Usage: scripts/run_matlab_tests.sh [TASK ...] + +Runs LabKit MATLAB build tasks. With no TASK arguments, runs `buildtool test`. + +Examples: + scripts/run_matlab_tests.sh + scripts/run_matlab_tests.sh checkStyle + scripts/run_matlab_tests.sh testUnit coverage + scripts/run_matlab_tests.sh testGuiStructural + +Common tasks: + checkStyle + test + testUnit + testIntegration + testProject + testLabkitDta + testLabkitBiosignal + testLabkitUi + testLabkitUiGui + testAppsElectrochem + testAppsElectrochemGui + testAppsDicGui + testAppsImageMeasurement + testAppsImageMeasurementGui + testAppsWearableGui + testAppsGui + testAppsSmokeGui + testGuiStructural + testGuiGesture + coverage + checkProject + packageDryRun + +Removed interface: + --suite, --test, and --gui are no longer supported. Use build task names. + +Environment: + MATLAB_CMD Optional path or command name for MATLAB. + MATLAB_FLAGS Optional MATLAB flags for every run. + MATLAB_TEST_LOG Optional log path. Defaults to ./matlab_test.log. USAGE } while [[ $# -gt 0 ]]; do case "$1" in - --gui) - INCLUDE_GUI=1 - shift - ;; - --suite) - if [[ $# -lt 2 ]]; then - echo "--suite requires a value." >&2 - usage >&2 - exit 2 - fi - SUITES+=("$2") - if [[ "$2" == "gui" ]]; then - INCLUDE_GUI=1 - fi - shift 2 - ;; - --test) - if [[ $# -lt 2 ]]; then - echo "--test requires a value." >&2 - usage >&2 - exit 2 - fi - TESTS+=("$2") - if [[ "$2" == test_gui_* ]]; then - INCLUDE_GUI=1 - fi - shift 2 - ;; -h|--help) usage exit 0 ;; - *) - echo "Unknown option: $1" >&2 + -*) + echo "Unsupported option: $1. Use build task names such as checkStyle, test, or testGuiStructural." >&2 usage >&2 exit 2 ;; + *) + if [[ ! "$1" =~ ^[A-Za-z][A-Za-z0-9_]*$ ]]; then + echo "Invalid build task name: $1" >&2 + usage >&2 + exit 2 + fi + TASKS+=("$1") + shift + ;; esac done +if [[ ${#TASKS[@]} -eq 0 ]]; then + TASKS=(test) +fi + find_matlab() { if [[ -n "${MATLAB_CMD:-}" ]]; then printf '%s\n' "$MATLAB_CMD" @@ -90,66 +99,40 @@ find_matlab() { return 1 } +matlab_literal() { + local value="$1" + value="${value//\'/\'\'}" + printf "'%s'" "$value" +} + MATLAB_BIN="$(find_matlab || true)" if [[ -z "$MATLAB_BIN" ]]; then echo "MATLAB executable not found. Set MATLAB_CMD=/path/to/matlab and retry." >&2 exit 127 fi +LOG_FILE="${MATLAB_TEST_LOG:-$ROOT_DIR/matlab_test.log}" +TASK_TEXT="${TASKS[*]}" + echo "Using MATLAB: $MATLAB_BIN" echo "Project root: $ROOT_DIR" +echo "Build tasks: $TASK_TEXT" +echo "MATLAB log: $LOG_FILE" -matlab_cell() { - if [[ $# -eq 0 ]]; then - printf '{}' - return 0 - fi - - local out="{" - local value - for value in "$@"; do - value="${value//\'/\'\'}" - out+="'$value'," - done - out="${out%,}}" - printf '%s' "$out" -} - -LOG_FILE="${MATLAB_TEST_LOG:-$ROOT_DIR/matlab_test.log}" -if [[ ${#SUITES[@]} -gt 0 ]]; then - SUITE_CELL="$(matlab_cell "${SUITES[@]}")" -else - SUITE_CELL="$(matlab_cell)" -fi -if [[ ${#TESTS[@]} -gt 0 ]]; then - TEST_CELL="$(matlab_cell "${TESTS[@]}")" -else - TEST_CELL="$(matlab_cell)" -fi -if [[ "$INCLUDE_GUI" -eq 1 ]]; then - MATLAB_FLAGS="${MATLAB_GUI_FLAGS:-}" - TEST_EXPR="runLabKitTests('IncludeGui', true, 'Suites', $SUITE_CELL, 'Tests', $TEST_CELL, 'FailIfNoTests', false);" -else - MATLAB_FLAGS="${MATLAB_FLAGS:--nojvm -nodisplay -noFigureWindows}" - TEST_EXPR="runLabKitTests('IncludeGui', false, 'Suites', $SUITE_CELL, 'Tests', $TEST_CELL, 'FailIfNoTests', false);" -fi MATLAB_FLAG_ARGS=() -if [[ -n "$MATLAB_FLAGS" ]]; then +if [[ -n "${MATLAB_FLAGS:-}" ]]; then read -r -a MATLAB_FLAG_ARGS <<< "$MATLAB_FLAGS" fi + rm -f "$LOG_FILE" set +e -if [[ ${#MATLAB_FLAG_ARGS[@]} -gt 0 ]]; then - "$MATLAB_BIN" "${MATLAB_FLAG_ARGS[@]}" -logfile "$LOG_FILE" -batch "cd('$ROOT_DIR'); addpath(fullfile(pwd, 'tests')); $TEST_EXPR" -else - "$MATLAB_BIN" -logfile "$LOG_FILE" -batch "cd('$ROOT_DIR'); addpath(fullfile(pwd, 'tests')); $TEST_EXPR" -fi +"$MATLAB_BIN" "${MATLAB_FLAG_ARGS[@]}" -logfile "$LOG_FILE" -batch "cd($(matlab_literal "$ROOT_DIR")); buildtool $TASK_TEXT;" status=$? set -e if [[ "$status" -eq 0 ]]; then - echo "MATLAB tests completed successfully. Log: $LOG_FILE" + echo "MATLAB build tasks completed successfully. Log: $LOG_FILE" elif [[ -f "$LOG_FILE" ]]; then cat "$LOG_FILE" else diff --git a/tests/AGENTS.md b/tests/AGENTS.md index 8ff90ac..2a72a95 100644 --- a/tests/AGENTS.md +++ b/tests/AGENTS.md @@ -30,7 +30,7 @@ Tests mirror source ownership. Do not create a parallel runner framework unless - Keep fixtures synthetic and minimal. - Never copy raw local lab files, real filenames, timestamps, absolute paths, subject names, device IDs, or proprietary metadata into tracked files. - Parser regressions should preserve only structural format details required for coverage. -- Run `scripts/run_matlab_tests.sh --suite project` after fixture, hygiene, architecture, or test-layout changes. +- Run `buildtool testProject` after fixture, hygiene, architecture, or test-layout changes. ## Documentation Sync diff --git a/tests/gui/structural/apps/dic/LegacyGuiLayoutDicTest.m b/tests/gui/structural/apps/dic/GuiLayoutDicTest.m similarity index 92% rename from tests/gui/structural/apps/dic/LegacyGuiLayoutDicTest.m rename to tests/gui/structural/apps/dic/GuiLayoutDicTest.m index 12b7f64..c8a50c8 100644 --- a/tests/gui/structural/apps/dic/LegacyGuiLayoutDicTest.m +++ b/tests/gui/structural/apps/dic/GuiLayoutDicTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutDicTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTDICTEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutDicTest < matlab.uitest.TestCase + %GUILAYOUTDICTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_dic(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_dic(); + verify_gui_layout_dic(); end end end -function legacy_test_gui_layout_dic() +function verify_gui_layout_dic() %TEST_GUI_LAYOUT_DIC Verify DIC GUI layout contracts. h = guiTestHelpers(); diff --git a/tests/gui/structural/apps/electrochem/LegacyGuiLayoutElectrochemTest.m b/tests/gui/structural/apps/electrochem/GuiLayoutElectrochemTest.m similarity index 96% rename from tests/gui/structural/apps/electrochem/LegacyGuiLayoutElectrochemTest.m rename to tests/gui/structural/apps/electrochem/GuiLayoutElectrochemTest.m index e633603..1a6d92e 100644 --- a/tests/gui/structural/apps/electrochem/LegacyGuiLayoutElectrochemTest.m +++ b/tests/gui/structural/apps/electrochem/GuiLayoutElectrochemTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutElectrochemTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTELECTROCHEMTEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutElectrochemTest < matlab.uitest.TestCase + %GUILAYOUTELECTROCHEMTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_electrochem(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_electrochem(); + verify_gui_layout_electrochem(); end end end -function legacy_test_gui_layout_electrochem() +function verify_gui_layout_electrochem() %TEST_GUI_LAYOUT_ELECTROCHEM Verify electrochemistry GUI layout contracts. h = guiTestHelpers(); diff --git a/tests/gui/structural/apps/image_measurement/LegacyGuiLayoutImageMeasurementTest.m b/tests/gui/structural/apps/image_measurement/GuiLayoutImageMeasurementTest.m similarity index 93% rename from tests/gui/structural/apps/image_measurement/LegacyGuiLayoutImageMeasurementTest.m rename to tests/gui/structural/apps/image_measurement/GuiLayoutImageMeasurementTest.m index 07918a2..0c410af 100644 --- a/tests/gui/structural/apps/image_measurement/LegacyGuiLayoutImageMeasurementTest.m +++ b/tests/gui/structural/apps/image_measurement/GuiLayoutImageMeasurementTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutImageMeasurementTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTIMAGEMEASUREMENTTEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutImageMeasurementTest < matlab.uitest.TestCase + %GUILAYOUTIMAGEMEASUREMENTTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_image_measurement(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_image_measurement(); + verify_gui_layout_image_measurement(); end end end -function legacy_test_gui_layout_image_measurement() +function verify_gui_layout_image_measurement() %TEST_GUI_LAYOUT_IMAGE_MEASUREMENT Verify image-measurement GUI layout contracts. h = guiTestHelpers(); diff --git a/tests/gui/structural/apps/smoke/LegacyGuiSmokeTest.m b/tests/gui/structural/apps/smoke/GuiSmokeTest.m similarity index 93% rename from tests/gui/structural/apps/smoke/LegacyGuiSmokeTest.m rename to tests/gui/structural/apps/smoke/GuiSmokeTest.m index dad61c5..74583ad 100644 --- a/tests/gui/structural/apps/smoke/LegacyGuiSmokeTest.m +++ b/tests/gui/structural/apps/smoke/GuiSmokeTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiSmokeTest < matlab.uitest.TestCase - %LEGACYGUISMOKETEST Official wrapper for migrated legacy coverage. +classdef GuiSmokeTest < matlab.uitest.TestCase + %GUISMOKETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural', 'Smoke'}) function test_gui_smoke(testCase) setupLabKitTestPath(); - legacy_test_gui_smoke(); + verify_gui_smoke(); end end end -function legacy_test_gui_smoke() +function verify_gui_smoke() %TEST_GUI_SMOKE Verify GUI entry points can launch. assertUifigureAvailable(); diff --git a/tests/gui/structural/apps/wearable/LegacyGuiLayoutWearableTest.m b/tests/gui/structural/apps/wearable/GuiLayoutWearableTest.m similarity index 87% rename from tests/gui/structural/apps/wearable/LegacyGuiLayoutWearableTest.m rename to tests/gui/structural/apps/wearable/GuiLayoutWearableTest.m index 9d48d28..13af43c 100644 --- a/tests/gui/structural/apps/wearable/LegacyGuiLayoutWearableTest.m +++ b/tests/gui/structural/apps/wearable/GuiLayoutWearableTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutWearableTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTWEARABLETEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutWearableTest < matlab.uitest.TestCase + %GUILAYOUTWEARABLETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_wearable(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_wearable(); + verify_gui_layout_wearable(); end end end -function legacy_test_gui_layout_wearable() +function verify_gui_layout_wearable() %TEST_GUI_LAYOUT_WEARABLE Verify wearable GUI layout contracts. h = guiTestHelpers(); diff --git a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiAnchorCurveEditorTest.m b/tests/gui/structural/labkit/ui/GuiLayoutUiAnchorCurveEditorTest.m similarity index 95% rename from tests/gui/structural/labkit/ui/LegacyGuiLayoutUiAnchorCurveEditorTest.m rename to tests/gui/structural/labkit/ui/GuiLayoutUiAnchorCurveEditorTest.m index cfae429..054f4dc 100644 --- a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiAnchorCurveEditorTest.m +++ b/tests/gui/structural/labkit/ui/GuiLayoutUiAnchorCurveEditorTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutUiAnchorCurveEditorTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTUIANCHORCURVEEDITORTEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutUiAnchorCurveEditorTest < matlab.uitest.TestCase + %GUILAYOUTUIANCHORCURVEEDITORTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_ui_anchor_curve_editor(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_ui_anchor_curve_editor(); + verify_gui_layout_ui_anchor_curve_editor(); end end end -function legacy_test_gui_layout_ui_anchor_curve_editor() +function verify_gui_layout_ui_anchor_curve_editor() %TEST_GUI_LAYOUT_UI_ANCHOR_CURVE_EDITOR Verify anchor curve editor contracts. h = guiTestHelpers(); diff --git a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiAxesWorkbenchTest.m b/tests/gui/structural/labkit/ui/GuiLayoutUiAxesWorkbenchTest.m similarity index 97% rename from tests/gui/structural/labkit/ui/LegacyGuiLayoutUiAxesWorkbenchTest.m rename to tests/gui/structural/labkit/ui/GuiLayoutUiAxesWorkbenchTest.m index dc10750..5315fc0 100644 --- a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiAxesWorkbenchTest.m +++ b/tests/gui/structural/labkit/ui/GuiLayoutUiAxesWorkbenchTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutUiAxesWorkbenchTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTUIAXESWORKBENCHTEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutUiAxesWorkbenchTest < matlab.uitest.TestCase + %GUILAYOUTUIAXESWORKBENCHTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_ui_axes_workbench(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_ui_axes_workbench(); + verify_gui_layout_ui_axes_workbench(); end end end -function legacy_test_gui_layout_ui_axes_workbench() +function verify_gui_layout_ui_axes_workbench() %TEST_GUI_LAYOUT_UI_AXES_WORKBENCH Verify axes, shell, and plot-control helpers. h = guiTestHelpers(); diff --git a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiBasicControlsTest.m b/tests/gui/structural/labkit/ui/GuiLayoutUiBasicControlsTest.m similarity index 98% rename from tests/gui/structural/labkit/ui/LegacyGuiLayoutUiBasicControlsTest.m rename to tests/gui/structural/labkit/ui/GuiLayoutUiBasicControlsTest.m index fc8d7eb..4848003 100644 --- a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiBasicControlsTest.m +++ b/tests/gui/structural/labkit/ui/GuiLayoutUiBasicControlsTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutUiBasicControlsTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTUIBASICCONTROLSTEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutUiBasicControlsTest < matlab.uitest.TestCase + %GUILAYOUTUIBASICCONTROLSTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_ui_basic_controls(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_ui_basic_controls(); + verify_gui_layout_ui_basic_controls(); end end end -function legacy_test_gui_layout_ui_basic_controls() +function verify_gui_layout_ui_basic_controls() %TEST_GUI_LAYOUT_UI_BASIC_CONTROLS Verify basic reusable UI controls/panels. h = guiTestHelpers(); diff --git a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiBusyStateTest.m b/tests/gui/structural/labkit/ui/GuiLayoutUiBusyStateTest.m similarity index 92% rename from tests/gui/structural/labkit/ui/LegacyGuiLayoutUiBusyStateTest.m rename to tests/gui/structural/labkit/ui/GuiLayoutUiBusyStateTest.m index 929191d..8e3f49c 100644 --- a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiBusyStateTest.m +++ b/tests/gui/structural/labkit/ui/GuiLayoutUiBusyStateTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutUiBusyStateTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTUIBUSYSTATETEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutUiBusyStateTest < matlab.uitest.TestCase + %GUILAYOUTUIBUSYSTATETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_ui_busy_state(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_ui_busy_state(); + verify_gui_layout_ui_busy_state(); end end end -function legacy_test_gui_layout_ui_busy_state() +function verify_gui_layout_ui_busy_state() %TEST_GUI_LAYOUT_UI_BUSY_STATE Verify runWithBusyState contracts. h = guiTestHelpers(); diff --git a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiDebugTraceTest.m b/tests/gui/structural/labkit/ui/GuiLayoutUiDebugTraceTest.m similarity index 95% rename from tests/gui/structural/labkit/ui/LegacyGuiLayoutUiDebugTraceTest.m rename to tests/gui/structural/labkit/ui/GuiLayoutUiDebugTraceTest.m index fe200e5..b47ecd5 100644 --- a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiDebugTraceTest.m +++ b/tests/gui/structural/labkit/ui/GuiLayoutUiDebugTraceTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutUiDebugTraceTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTUIDEBUGTRACETEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutUiDebugTraceTest < matlab.uitest.TestCase + %GUILAYOUTUIDEBUGTRACETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_ui_debug_trace(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_ui_debug_trace(); + verify_gui_layout_ui_debug_trace(); end end end -function legacy_test_gui_layout_ui_debug_trace() +function verify_gui_layout_ui_debug_trace() %TEST_GUI_LAYOUT_UI_DEBUG_TRACE Verify GUI callback instrumentation for debug logs. h = guiTestHelpers(); diff --git a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiImageAxesRuntimeTest.m b/tests/gui/structural/labkit/ui/GuiLayoutUiImageAxesRuntimeTest.m similarity index 92% rename from tests/gui/structural/labkit/ui/LegacyGuiLayoutUiImageAxesRuntimeTest.m rename to tests/gui/structural/labkit/ui/GuiLayoutUiImageAxesRuntimeTest.m index 1226d46..a0299ff 100644 --- a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiImageAxesRuntimeTest.m +++ b/tests/gui/structural/labkit/ui/GuiLayoutUiImageAxesRuntimeTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutUiImageAxesRuntimeTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTUIIMAGEAXESRUNTIMETEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutUiImageAxesRuntimeTest < matlab.uitest.TestCase + %GUILAYOUTUIIMAGEAXESRUNTIMETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_ui_image_axes_runtime(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_ui_image_axes_runtime(); + verify_gui_layout_ui_image_axes_runtime(); end end end -function legacy_test_gui_layout_ui_image_axes_runtime() +function verify_gui_layout_ui_image_axes_runtime() %TEST_GUI_LAYOUT_UI_IMAGE_AXES_RUNTIME Verify managed image axes interaction runtime. h = guiTestHelpers(); diff --git a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiScaleBarPanelTest.m b/tests/gui/structural/labkit/ui/GuiLayoutUiScaleBarPanelTest.m similarity index 95% rename from tests/gui/structural/labkit/ui/LegacyGuiLayoutUiScaleBarPanelTest.m rename to tests/gui/structural/labkit/ui/GuiLayoutUiScaleBarPanelTest.m index b3e4000..65f8914 100644 --- a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiScaleBarPanelTest.m +++ b/tests/gui/structural/labkit/ui/GuiLayoutUiScaleBarPanelTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutUiScaleBarPanelTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTUISCALEBARPANELTEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutUiScaleBarPanelTest < matlab.uitest.TestCase + %GUILAYOUTUISCALEBARPANELTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_ui_scale_bar_panel(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_ui_scale_bar_panel(); + verify_gui_layout_ui_scale_bar_panel(); end end end -function legacy_test_gui_layout_ui_scale_bar_panel() +function verify_gui_layout_ui_scale_bar_panel() %TEST_GUI_LAYOUT_UI_SCALE_BAR_PANEL Verify reusable scale-bar panel contracts. h = guiTestHelpers(); diff --git a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiScaleBarToolTest.m b/tests/gui/structural/labkit/ui/GuiLayoutUiScaleBarToolTest.m similarity index 96% rename from tests/gui/structural/labkit/ui/LegacyGuiLayoutUiScaleBarToolTest.m rename to tests/gui/structural/labkit/ui/GuiLayoutUiScaleBarToolTest.m index 7e21988..abc1d0b 100644 --- a/tests/gui/structural/labkit/ui/LegacyGuiLayoutUiScaleBarToolTest.m +++ b/tests/gui/structural/labkit/ui/GuiLayoutUiScaleBarToolTest.m @@ -1,15 +1,15 @@ -classdef LegacyGuiLayoutUiScaleBarToolTest < matlab.uitest.TestCase - %LEGACYGUILAYOUTUISCALEBARTOOLTEST Official wrapper for migrated legacy coverage. +classdef GuiLayoutUiScaleBarToolTest < matlab.uitest.TestCase + %GUILAYOUTUISCALEBARTOOLTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'GUI', 'Structural'}) function test_gui_layout_ui_scale_bar_tool(testCase) setupLabKitTestPath(); - legacy_test_gui_layout_ui_scale_bar_tool(); + verify_gui_layout_ui_scale_bar_tool(); end end end -function legacy_test_gui_layout_ui_scale_bar_tool() +function verify_gui_layout_ui_scale_bar_tool() %TEST_GUI_LAYOUT_UI_SCALE_BAR_TOOL Verify high-level scale-bar tool contracts. h = guiTestHelpers(); diff --git a/tests/integration/project/LegacyAppEntrypointBoundariesTest.m b/tests/integration/project/AppEntrypointBoundariesTest.m similarity index 92% rename from tests/integration/project/LegacyAppEntrypointBoundariesTest.m rename to tests/integration/project/AppEntrypointBoundariesTest.m index 9ab1cfb..4ad6795 100644 --- a/tests/integration/project/LegacyAppEntrypointBoundariesTest.m +++ b/tests/integration/project/AppEntrypointBoundariesTest.m @@ -1,15 +1,15 @@ -classdef LegacyAppEntrypointBoundariesTest < matlab.unittest.TestCase - %LEGACYAPPENTRYPOINTBOUNDARIESTEST Official wrapper for migrated legacy coverage. +classdef AppEntrypointBoundariesTest < matlab.unittest.TestCase + %APPENTRYPOINTBOUNDARIESTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Integration', 'Style'}) function test_app_entrypoint_boundaries(testCase) setupLabKitTestPath(); - legacy_test_app_entrypoint_boundaries(); + verify_app_entrypoint_boundaries(); end end end -function legacy_test_app_entrypoint_boundaries() +function verify_app_entrypoint_boundaries() %TEST_APP_ENTRYPOINT_BOUNDARIES Verify app locations and entrypoint shape. root = testRepoRoot(); diff --git a/tests/integration/project/LegacyAppOwnedWorkflowBoundariesTest.m b/tests/integration/project/AppOwnedWorkflowBoundariesTest.m similarity index 97% rename from tests/integration/project/LegacyAppOwnedWorkflowBoundariesTest.m rename to tests/integration/project/AppOwnedWorkflowBoundariesTest.m index 8ea6807..1359efa 100644 --- a/tests/integration/project/LegacyAppOwnedWorkflowBoundariesTest.m +++ b/tests/integration/project/AppOwnedWorkflowBoundariesTest.m @@ -1,15 +1,15 @@ -classdef LegacyAppOwnedWorkflowBoundariesTest < matlab.unittest.TestCase - %LEGACYAPPOWNEDWORKFLOWBOUNDARIESTEST Official wrapper for migrated legacy coverage. +classdef AppOwnedWorkflowBoundariesTest < matlab.unittest.TestCase + %APPOWNEDWORKFLOWBOUNDARIESTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Integration', 'Style'}) function test_app_owned_workflow_boundaries(testCase) setupLabKitTestPath(); - legacy_test_app_owned_workflow_boundaries(); + verify_app_owned_workflow_boundaries(); end end end -function legacy_test_app_owned_workflow_boundaries() +function verify_app_owned_workflow_boundaries() %TEST_APP_OWNED_WORKFLOW_BOUNDARIES Verify app-local workflow ownership. root = testRepoRoot(); diff --git a/tests/integration/project/LegacyPackageDependencyBoundariesTest.m b/tests/integration/project/PackageDependencyBoundariesTest.m similarity index 92% rename from tests/integration/project/LegacyPackageDependencyBoundariesTest.m rename to tests/integration/project/PackageDependencyBoundariesTest.m index 061eb1f..2ddec91 100644 --- a/tests/integration/project/LegacyPackageDependencyBoundariesTest.m +++ b/tests/integration/project/PackageDependencyBoundariesTest.m @@ -1,15 +1,15 @@ -classdef LegacyPackageDependencyBoundariesTest < matlab.unittest.TestCase - %LEGACYPACKAGEDEPENDENCYBOUNDARIESTEST Official wrapper for migrated legacy coverage. +classdef PackageDependencyBoundariesTest < matlab.unittest.TestCase + %PACKAGEDEPENDENCYBOUNDARIESTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Integration', 'Style'}) function test_package_dependency_boundaries(testCase) setupLabKitTestPath(); - legacy_test_package_dependency_boundaries(); + verify_package_dependency_boundaries(); end end end -function legacy_test_package_dependency_boundaries() +function verify_package_dependency_boundaries() %TEST_PACKAGE_DEPENDENCY_BOUNDARIES Verify reusable package dependency rules. root = testRepoRoot(); diff --git a/tests/integration/project/LegacyPackagePublicSurfaceTest.m b/tests/integration/project/PackagePublicSurfaceTest.m similarity index 96% rename from tests/integration/project/LegacyPackagePublicSurfaceTest.m rename to tests/integration/project/PackagePublicSurfaceTest.m index ff684fe..b9e186b 100644 --- a/tests/integration/project/LegacyPackagePublicSurfaceTest.m +++ b/tests/integration/project/PackagePublicSurfaceTest.m @@ -1,15 +1,15 @@ -classdef LegacyPackagePublicSurfaceTest < matlab.unittest.TestCase - %LEGACYPACKAGEPUBLICSURFACETEST Official wrapper for migrated legacy coverage. +classdef PackagePublicSurfaceTest < matlab.unittest.TestCase + %PACKAGEPUBLICSURFACETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Integration', 'Style'}) function test_package_public_surface(testCase) setupLabKitTestPath(); - legacy_test_package_public_surface(); + verify_package_public_surface(); end end end -function legacy_test_package_public_surface() +function verify_package_public_surface() %TEST_PACKAGE_PUBLIC_SURFACE Verify public and private package file surfaces. root = testRepoRoot(); diff --git a/tests/integration/project/LegacySensitiveSampleHygieneTest.m b/tests/integration/project/SensitiveSampleHygieneTest.m similarity index 93% rename from tests/integration/project/LegacySensitiveSampleHygieneTest.m rename to tests/integration/project/SensitiveSampleHygieneTest.m index ae65b84..a1fe34f 100644 --- a/tests/integration/project/LegacySensitiveSampleHygieneTest.m +++ b/tests/integration/project/SensitiveSampleHygieneTest.m @@ -1,15 +1,15 @@ -classdef LegacySensitiveSampleHygieneTest < matlab.unittest.TestCase - %LEGACYSENSITIVESAMPLEHYGIENETEST Official wrapper for migrated legacy coverage. +classdef SensitiveSampleHygieneTest < matlab.unittest.TestCase + %SENSITIVESAMPLEHYGIENETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Integration', 'Style'}) function test_sensitive_sample_hygiene(testCase) setupLabKitTestPath(); - legacy_test_sensitive_sample_hygiene(); + verify_sensitive_sample_hygiene(); end end end -function legacy_test_sensitive_sample_hygiene() +function verify_sensitive_sample_hygiene() %TEST_SENSITIVE_SAMPLE_HYGIENE Guard tracked text against local sample-data leaks. root = testRepoRoot(); diff --git a/tests/integration/project/LegacyStartupBoundariesTest.m b/tests/integration/project/StartupBoundariesTest.m similarity index 93% rename from tests/integration/project/LegacyStartupBoundariesTest.m rename to tests/integration/project/StartupBoundariesTest.m index afdf713..461d130 100644 --- a/tests/integration/project/LegacyStartupBoundariesTest.m +++ b/tests/integration/project/StartupBoundariesTest.m @@ -1,15 +1,15 @@ -classdef LegacyStartupBoundariesTest < matlab.unittest.TestCase - %LEGACYSTARTUPBOUNDARIESTEST Official wrapper for migrated legacy coverage. +classdef StartupBoundariesTest < matlab.unittest.TestCase + %STARTUPBOUNDARIESTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Integration', 'Style'}) function test_startup_boundaries(testCase) setupLabKitTestPath(); - legacy_test_startup_boundaries(); + verify_startup_boundaries(); end end end -function legacy_test_startup_boundaries() +function verify_startup_boundaries() %TEST_STARTUP_BOUNDARIES Check startup path and root entrypoint boundaries. root = testRepoRoot(); diff --git a/tests/unit/apps/electrochem/LegacyChronoOverlayExportTest.m b/tests/unit/apps/electrochem/ChronoOverlayExportTest.m similarity index 94% rename from tests/unit/apps/electrochem/LegacyChronoOverlayExportTest.m rename to tests/unit/apps/electrochem/ChronoOverlayExportTest.m index 53d8dc0..776242d 100644 --- a/tests/unit/apps/electrochem/LegacyChronoOverlayExportTest.m +++ b/tests/unit/apps/electrochem/ChronoOverlayExportTest.m @@ -1,15 +1,15 @@ -classdef LegacyChronoOverlayExportTest < matlab.unittest.TestCase - %LEGACYCHRONOOVERLAYEXPORTTEST Official wrapper for migrated legacy coverage. +classdef ChronoOverlayExportTest < matlab.unittest.TestCase + %CHRONOOVERLAYEXPORTTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_chronoOverlayExport(testCase) setupLabKitTestPath(); - legacy_test_chronoOverlayExport(); + verify_chronoOverlayExport(); end end end -function legacy_test_chronoOverlayExport() +function verify_chronoOverlayExport() %TEST_CHRONOOVERLAYEXPORT Verify chrono overlay alignment and export tables. checkGapCenterAlignment(); diff --git a/tests/unit/apps/electrochem/LegacyCicExportTest.m b/tests/unit/apps/electrochem/CicExportTest.m similarity index 83% rename from tests/unit/apps/electrochem/LegacyCicExportTest.m rename to tests/unit/apps/electrochem/CicExportTest.m index 085d334..7046b92 100644 --- a/tests/unit/apps/electrochem/LegacyCicExportTest.m +++ b/tests/unit/apps/electrochem/CicExportTest.m @@ -1,15 +1,15 @@ -classdef LegacyCicExportTest < matlab.unittest.TestCase - %LEGACYCICEXPORTTEST Official wrapper for migrated legacy coverage. +classdef CicExportTest < matlab.unittest.TestCase + %CICEXPORTTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_cicExport(testCase) setupLabKitTestPath(); - legacy_test_cicExport(); + verify_cicExport(); end end end -function legacy_test_cicExport() +function verify_cicExport() %TEST_CICEXPORT Verify app-side CIC result/export table helpers. item = makeChronoFixtureItem('', 'chrono "cic".DTA'); @@ -37,24 +37,24 @@ function legacy_test_cicExport() expectedNames = {'File', 'Amp_A', 'Emc_V', 'Ema_V', 'Qc_C', 'Qa_C', 'Qt_C', ... 'CICc_mCcm2', 'CICa_mCcm2', 'CICt_mCcm2', 'Safe', 'Detection'}; assert(isequal(T.Properties.VariableNames, expectedNames), ... - 'CIC export table headers should preserve legacy mC CSV names.'); + 'CIC export table headers should preserve stable mC CSV names.'); assertClose(T.Amp_A(1), item.analysis.ampEstimate_A, 1e-15, 'CIC amp export value'); assertClose(T.CICc_mCcm2(1), item.analysis.CICc_mCcm2, 1e-15, 'CIC mC cathodic value'); assert(T.Safe(1) == item.analysis.safe, 'CIC safe flag should be preserved.'); assert(strcmp(T.Detection{1}, item.analysis.detectMode), 'CIC detection mode should be preserved.'); assert(isnan(T.Amp_A(2)) && isnan(T.CICt_mCcm2(2)), 'Failed CIC rows should use NaN numeric values.'); - assert(T.Safe(2) == 0, 'Failed CIC rows should preserve legacy Safe=0.'); - assert(strcmp(T.Detection{2}, 'failed'), 'Failed CIC rows should preserve legacy failed detection label.'); + assert(T.Safe(2) == 0, 'Failed CIC rows should preserve stable Safe=0.'); + assert(strcmp(T.Detection{2}, 'failed'), 'Failed CIC rows should preserve stable failed detection label.'); Tu = buildCICResultsTable(item, 'uC/cm^2'); assert(isequal(Tu.Properties.VariableNames(8:10), {'CICc_uCcm2', 'CICa_uCcm2', 'CICt_uCcm2'}), ... - 'CIC export table headers should preserve legacy uC CSV names.'); + 'CIC export table headers should preserve stable uC CSV names.'); assertClose(Tu.CICc_uCcm2(1), 1e3 * item.analysis.CICc_mCcm2, 1e-12, 'CIC uC cathodic value'); [C, cols] = buildCICBatchTableData(items, 'uC/cm^2'); assert(isequal(cols, {'File','Amp(A)','Emc(V)','Ema(V)','Qc(uC/cm^2)','Qa(uC/cm^2)','Qtot(uC/cm^2)','Safe'}), ... - 'CIC batch UI table headers should preserve legacy unit labels.'); - assert(isequal(size(C), [2 8]), 'CIC batch UI table should preserve legacy 8-column shape.'); + 'CIC batch UI table headers should preserve stable unit labels.'); + assert(isequal(size(C), [2 8]), 'CIC batch UI table should preserve stable 8-column shape.'); assertClose(C{1, 5}, 1e3 * item.analysis.CICc_mCcm2, 1e-12, 'CIC batch UI scaled Qc value'); assert(strcmp(C{1, 8}, item.analysis.limitSide), 'CIC batch UI unsafe label should preserve limit side.'); assert(strcmp(C{2, 8}, 'parse/analyze failed'), 'CIC batch UI failed rows should preserve failure label.'); @@ -64,11 +64,11 @@ function legacy_test_cicExport() writeCICResultsCSV(items, tmp, 'mC/cm^2'); txt = fileread(tmp); header = 'File,Amp_A,Emc_V,Ema_V,Qc_C,Qa_C,Qt_C,CICc_mCcm2,CICa_mCcm2,CICt_mCcm2,Safe,Detection'; - assert(startsWith(string(txt), header), 'CIC CSV header should preserve legacy spelling and order.'); - assert(contains(string(txt), '"chrono "cic".DTA"'), 'CIC CSV should preserve legacy unescaped quoted file text.'); + assert(startsWith(string(txt), header), 'CIC CSV header should preserve stable spelling and order.'); + assert(contains(string(txt), '"chrono "cic".DTA"'), 'CIC CSV should preserve stable unescaped quoted file text.'); assert(contains(string(txt), '"metadata-current"'), 'CIC CSV should preserve detection field.'); assert(contains(string(txt), '"failed "file".DTA",,,,,,,,,,0,"failed"'), ... - 'CIC CSV failed rows should preserve legacy empty fields and failed marker.'); + 'CIC CSV failed rows should preserve stable empty fields and failed marker.'); end function deleteIfExists(filepath) diff --git a/tests/unit/apps/electrochem/LegacyComputeCICTest.m b/tests/unit/apps/electrochem/ComputeCICTest.m similarity index 87% rename from tests/unit/apps/electrochem/LegacyComputeCICTest.m rename to tests/unit/apps/electrochem/ComputeCICTest.m index e2e698c..c548066 100644 --- a/tests/unit/apps/electrochem/LegacyComputeCICTest.m +++ b/tests/unit/apps/electrochem/ComputeCICTest.m @@ -1,15 +1,15 @@ -classdef LegacyComputeCICTest < matlab.unittest.TestCase - %LEGACYCOMPUTECICTEST Official wrapper for migrated legacy coverage. +classdef ComputeCICTest < matlab.unittest.TestCase + %COMPUTECICTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_computeCIC(testCase) setupLabKitTestPath(); - legacy_test_computeCIC(); + verify_computeCIC(); end end end -function legacy_test_computeCIC() +function verify_computeCIC() %TEST_COMPUTECIC Verify app-side CIC / voltage-transient analysis. item = makeChronoFixtureItem(); @@ -24,7 +24,7 @@ function legacy_test_computeCIC() A = computeCIC(item, opts); assert(A.ok, A.message); - assert(strcmp(A.message, 'OK'), 'Successful CIC result should preserve legacy OK status.'); + assert(strcmp(A.message, 'OK'), 'Successful CIC result should preserve stable OK status.'); assert(strcmp(A.detectMode, 'metadata-current'), 'Default fixture should use metadata-current detection.'); assertClose(A.delay_s, 10e-6, 1e-15, 'Delay'); assertClose(A.area_cm2, 1, 1e-15, 'Metadata area'); @@ -35,8 +35,8 @@ function legacy_test_computeCIC() assertClose(A.Epost, -0.00176742, 1e-12, 'Post-pulse baseline'); assertClose(A.Eipp, -0.0029674200000000001, 1e-12, 'Cathodic baseline selection'); assertClose(A.Eipp_gap, -0.183117, 1e-12, 'Anodic baseline selection'); - assert(strcmp(A.baselineCathSource, 'pre-pulse median'), 'Cathodic baseline source should match legacy selection.'); - assert(strcmp(A.baselineAnodSource, 'interpulse median'), 'Anodic baseline source should match legacy selection.'); + assert(strcmp(A.baselineCathSource, 'pre-pulse median'), 'Cathodic baseline source should match stable selection.'); + assert(strcmp(A.baselineAnodSource, 'interpulse median'), 'Anodic baseline source should match stable selection.'); assertClose(A.Vc_on, -0.613367, 1e-12, 'Cathodic onset voltage'); assertClose(A.Va_on, 0.57073300000000815, 1e-12, 'Anodic onset voltage'); assertClose(A.Va_cath_mag, 0.61039957999999994, 1e-12, 'Cathodic access voltage magnitude'); @@ -46,8 +46,8 @@ function legacy_test_computeCIC() assertClose(A.Qt_C, 4.5030790449999986e-06, 1e-18, 'Measured total charge'); assertClose(A.CICc_mCcm2, 0.0022700154949999982, 1e-15, 'Cathodic CIC'); assertClose(A.CICt_mCcm2, 0.0045030790449999986, 1e-15, 'Total CIC'); - assert(~A.cathOK && A.anodOK && ~A.safe, 'Default water-window safety should match legacy result.'); - assert(strcmp(A.limitSide, 'cathodic exceeded'), 'Default safety side should match legacy wording.'); + assert(~A.cathOK && A.anodOK && ~A.safe, 'Default water-window safety should match stable result.'); + assert(strcmp(A.limitSide, 'cathodic exceeded'), 'Default safety side should match stable wording.'); opts.usedMeasuredCurrent = false; B = computeCIC(item, opts); @@ -68,12 +68,12 @@ function legacy_test_computeCIC() opts.anodLimit = 2; D = computeCIC(item, opts); assert(D.cathOK && D.anodOK && D.safe, 'Relaxed water window should be safe.'); - assert(strcmp(D.limitSide, 'safe'), 'Safe status text should match legacy wording.'); + assert(strcmp(D.limitSide, 'safe'), 'Safe status text should match stable wording.'); bad = struct('meta', struct(), 'tables', struct([])); E = computeCIC(bad, struct()); assert(~E.ok, 'Missing curve should fail.'); - assert(strcmp(E.message, 'Main transient table not found.'), 'Missing curve message should match legacy wording.'); + assert(strcmp(E.message, 'Main transient table not found.'), 'Missing curve message should match stable wording.'); end diff --git a/tests/unit/apps/electrochem/LegacyComputeCSCTest.m b/tests/unit/apps/electrochem/ComputeCSCTest.m similarity index 92% rename from tests/unit/apps/electrochem/LegacyComputeCSCTest.m rename to tests/unit/apps/electrochem/ComputeCSCTest.m index d4adb3c..cda8423 100644 --- a/tests/unit/apps/electrochem/LegacyComputeCSCTest.m +++ b/tests/unit/apps/electrochem/ComputeCSCTest.m @@ -1,15 +1,15 @@ -classdef LegacyComputeCSCTest < matlab.unittest.TestCase - %LEGACYCOMPUTECSCTEST Official wrapper for migrated legacy coverage. +classdef ComputeCSCTest < matlab.unittest.TestCase + %COMPUTECSCTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_computeCSC(testCase) setupLabKitTestPath(); - legacy_test_computeCSC(); + verify_computeCSC(); end end end -function legacy_test_computeCSC() +function verify_computeCSC() %TEST_COMPUTECSC Verify CV/CT charge and CSC app analysis. fixture = dtaFixturePath('cv_cyclic_voltammetry_pt_reference.DTA'); @@ -67,18 +67,18 @@ function legacy_test_computeCSC() D = computeCSC(curve, struct('scanRate', NaN)); assert(~D.ok, 'Missing scan rate should fail.'); - assert(strcmp(D.message, 'scan rate missing'), 'Missing scan-rate message should match legacy UI text.'); + assert(strcmp(D.message, 'scan rate missing'), 'Missing scan-rate message should match stable UI text.'); missingCurve = rmfield(curve, 'headers'); E = computeCSC(missingCurve, struct('scanRate', scanRate)); assert(~E.ok, 'Missing required columns should fail.'); - assert(strcmp(E.message, 'Need T, Vf, Im'), 'Missing-column message should match legacy UI text.'); + assert(strcmp(E.message, 'Need T, Vf, Im'), 'Missing-column message should match stable UI text.'); shortCurve = curve; shortCurve.data = shortCurve.data(1, :); F = computeCSC(shortCurve, struct('scanRate', scanRate)); assert(~F.ok, 'Single-point curve should fail.'); - assert(strcmp(F.message, 'Not enough points'), 'Single-point message should match legacy UI text.'); + assert(strcmp(F.message, 'Not enough points'), 'Single-point message should match stable UI text.'); expectedFields = {'ok', 'message', 'mode', 'scanRate', 'area_cm2', 't', 'Vf', 'Im', ... 'QctCath', 'QctAnod', 'QctFull', 'QcvCath', 'QcvAnod', 'QcvFull', ... diff --git a/tests/unit/apps/electrochem/LegacyComputeVTResistanceTest.m b/tests/unit/apps/electrochem/ComputeVTResistanceTest.m similarity index 90% rename from tests/unit/apps/electrochem/LegacyComputeVTResistanceTest.m rename to tests/unit/apps/electrochem/ComputeVTResistanceTest.m index ab09243..d7c3c97 100644 --- a/tests/unit/apps/electrochem/LegacyComputeVTResistanceTest.m +++ b/tests/unit/apps/electrochem/ComputeVTResistanceTest.m @@ -1,15 +1,15 @@ -classdef LegacyComputeVTResistanceTest < matlab.unittest.TestCase - %LEGACYCOMPUTEVTRESISTANCETEST Official wrapper for migrated legacy coverage. +classdef ComputeVTResistanceTest < matlab.unittest.TestCase + %COMPUTEVTRESISTANCETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_computeVTResistance(testCase) setupLabKitTestPath(); - legacy_test_computeVTResistance(); + verify_computeVTResistance(); end end end -function legacy_test_computeVTResistance() +function verify_computeVTResistance() %TEST_COMPUTEVTRESISTANCE Verify VT resistance app analysis. item = makeChronoFixtureItem(); @@ -21,7 +21,7 @@ function legacy_test_computeVTResistance() A = computeVTResistance(item, opts); assert(A.ok, A.message); - assert(strcmp(A.message, 'OK'), 'Successful VT resistance result should preserve legacy OK status.'); + assert(strcmp(A.message, 'OK'), 'Successful VT resistance result should preserve stable OK status.'); assert(strcmp(A.windowMode, opts.windowMode), 'Window mode should be echoed in the result.'); assert(strcmp(A.voltageMode, opts.voltageMode), 'Voltage mode should be echoed in the result.'); assert(strcmp(A.detectMode, 'metadata-current'), 'Default fixture should use metadata-current detection.'); @@ -61,7 +61,7 @@ function legacy_test_computeVTResistance() bad = struct('meta', struct(), 'tables', struct([])); D = computeVTResistance(bad, struct()); assert(~D.ok, 'Missing curve should fail.'); - assert(strcmp(D.message, 'Main transient table not found.'), 'Missing curve message should match legacy wording.'); + assert(strcmp(D.message, 'Main transient table not found.'), 'Missing curve message should match stable wording.'); end diff --git a/tests/unit/apps/electrochem/LegacyEisOverlayExportTest.m b/tests/unit/apps/electrochem/EisOverlayExportTest.m similarity index 91% rename from tests/unit/apps/electrochem/LegacyEisOverlayExportTest.m rename to tests/unit/apps/electrochem/EisOverlayExportTest.m index c2f4ce7..e1110aa 100644 --- a/tests/unit/apps/electrochem/LegacyEisOverlayExportTest.m +++ b/tests/unit/apps/electrochem/EisOverlayExportTest.m @@ -1,15 +1,15 @@ -classdef LegacyEisOverlayExportTest < matlab.unittest.TestCase - %LEGACYEISOVERLAYEXPORTTEST Official wrapper for migrated legacy coverage. +classdef EisOverlayExportTest < matlab.unittest.TestCase + %EISOVERLAYEXPORTTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_eisOverlayExport(testCase) setupLabKitTestPath(); - legacy_test_eisOverlayExport(); + verify_eisOverlayExport(); end end end -function legacy_test_eisOverlayExport() +function verify_eisOverlayExport() %TEST_EISOVERLAYEXPORT Verify EIS item schema and export/plot contracts. root = testRepoRoot(); @@ -43,9 +43,9 @@ function legacy_test_eisOverlayExport() source = readAppOwnedSource(appFile); assert(contains(source, '''Freq (Hz)''') && contains(source, '''Zreal (ohm)''') && ... contains(source, '''-Zimag (ohm)'''), ... - 'EIS app should preserve legacy axis labels.'); + 'EIS app should preserve stable axis labels.'); assert(contains(source, 'RowIndex') && contains(source, 'X_%s_%s') && contains(source, 'Y_%s_%s'), ... - 'EIS app should preserve legacy export column naming logic.'); + 'EIS app should preserve stable export column naming logic.'); assert(contains(source, 'axis(ax, ''equal'')'), ... 'EIS app should preserve equal-axis Nyquist plot behavior.'); diff --git a/tests/unit/apps/electrochem/LegacyVtResistanceExportTest.m b/tests/unit/apps/electrochem/VtResistanceExportTest.m similarity index 86% rename from tests/unit/apps/electrochem/LegacyVtResistanceExportTest.m rename to tests/unit/apps/electrochem/VtResistanceExportTest.m index 517fc58..c44f48f 100644 --- a/tests/unit/apps/electrochem/LegacyVtResistanceExportTest.m +++ b/tests/unit/apps/electrochem/VtResistanceExportTest.m @@ -1,15 +1,15 @@ -classdef LegacyVtResistanceExportTest < matlab.unittest.TestCase - %LEGACYVTRESISTANCEEXPORTTEST Official wrapper for migrated legacy coverage. +classdef VtResistanceExportTest < matlab.unittest.TestCase + %VTRESISTANCEEXPORTTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_vtResistanceExport(testCase) setupLabKitTestPath(); - legacy_test_vtResistanceExport(); + verify_vtResistanceExport(); end end end -function legacy_test_vtResistanceExport() +function verify_vtResistanceExport() %TEST_VTRESISTANCEEXPORT Verify VT resistance result/export table helpers. item = makeChronoFixtureItem('', 'chrono "vt".DTA'); @@ -29,7 +29,7 @@ function legacy_test_vtResistanceExport() 'Vc_baseline_V', 'Va_baseline_V', 'dVc_V', 'dVa_V', 'Rc_bc_ohm', ... 'Ra_bc_ohm', 'Ravg_bc_ohm', 'WindowMode', 'Detection', 'Status'}; assert(isequal(T.Properties.VariableNames, expectedNames), ... - 'VT resistance export table headers should preserve legacy CSV names.'); + 'VT resistance export table headers should preserve stable CSV names.'); assert(strcmp(T.File{1}, item.name), 'File name should be preserved.'); assertClose(T.Ic_A(1), item.analysis.Ic_est_A, 1e-15, 'Ic export value'); assertClose(T.Rc_bc_ohm(1), abs(item.analysis.Rc_dV_ohm), 1e-12, 'Baseline-corrected Rc export value'); @@ -38,12 +38,12 @@ function legacy_test_vtResistanceExport() assert(strcmp(T.Status{1}, item.analysis.message), 'Status should be preserved.'); assert(isnan(T.Ic_A(2)) && isnan(T.Ravg_bc_ohm(2)), 'Failed rows should use NaN numeric values.'); - assert(strcmp(T.WindowMode{2}, ''), 'Failed rows should preserve legacy blank window mode.'); - assert(strcmp(T.Detection{2}, 'failed'), 'Failed rows should preserve legacy failed detection label.'); + assert(strcmp(T.WindowMode{2}, ''), 'Failed rows should preserve stable blank window mode.'); + assert(strcmp(T.Detection{2}, 'failed'), 'Failed rows should preserve stable failed detection label.'); assert(strcmp(T.Status{2}, failed.analysis.message), 'Failed row status should preserve analysis message.'); C = buildVTBatchTableData(items); - assert(isequal(size(C), [2 9]), 'VT batch UI table should preserve legacy 9-column shape.'); + assert(isequal(size(C), [2 9]), 'VT batch UI table should preserve stable 9-column shape.'); assert(strcmp(C{1, 1}, item.name), 'VT batch UI table should preserve item name.'); assertClose(C{1, 6}, item.analysis.Rc_abs_ohm, 1e-12, 'VT batch UI table Rc value'); assert(strcmp(C{1, 9}, item.analysis.detectMode), 'VT batch UI table detection value'); @@ -54,11 +54,11 @@ function legacy_test_vtResistanceExport() writeVTResultsCSV(items, tmp); txt = fileread(tmp); header = 'File,Ic_A,Ia_A,Vc_ss_V,Va_ss_V,Vc_baseline_V,Va_baseline_V,dVc_V,dVa_V,Rc_bc_ohm,Ra_bc_ohm,Ravg_bc_ohm,WindowMode,Detection,Status'; - assert(startsWith(string(txt), header), 'VT CSV header should preserve legacy spelling and order.'); - assert(contains(string(txt), '"chrono ""vt"".DTA"'), 'VT CSV should preserve legacy quoted file escaping.'); + assert(startsWith(string(txt), header), 'VT CSV header should preserve stable spelling and order.'); + assert(contains(string(txt), '"chrono ""vt"".DTA"'), 'VT CSV should preserve stable quoted file escaping.'); assert(contains(string(txt), '"metadata-current","OK"'), 'VT CSV should preserve detection/status fields.'); assert(contains(string(txt), '"failed ""file"".DTA",NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,"","failed","bad ""msg"""'), ... - 'VT CSV failed rows should preserve legacy NaN and quoted text formatting.'); + 'VT CSV failed rows should preserve stable NaN and quoted text formatting.'); end function deleteIfExists(filepath) diff --git a/tests/unit/apps/image_measurement/LegacyFocusStackFusionTest.m b/tests/unit/apps/image_measurement/FocusStackFusionTest.m similarity index 97% rename from tests/unit/apps/image_measurement/LegacyFocusStackFusionTest.m rename to tests/unit/apps/image_measurement/FocusStackFusionTest.m index 274b7c5..394902b 100644 --- a/tests/unit/apps/image_measurement/LegacyFocusStackFusionTest.m +++ b/tests/unit/apps/image_measurement/FocusStackFusionTest.m @@ -1,15 +1,15 @@ -classdef LegacyFocusStackFusionTest < matlab.unittest.TestCase - %LEGACYFOCUSSTACKFUSIONTEST Official wrapper for migrated legacy coverage. +classdef FocusStackFusionTest < matlab.unittest.TestCase + %FOCUSSTACKFUSIONTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_focusStackFusion(testCase) setupLabKitTestPath(); - legacy_test_focusStackFusion(); + verify_focusStackFusion(); end end end -function legacy_test_focusStackFusion() +function verify_focusStackFusion() %TEST_FOCUSSTACKFUSION Verify focus-stack fusion app calculations. checkSyntheticFocusSelection(); diff --git a/tests/unit/apps/image_measurement/LegacyImageCurvatureMeasurementTest.m b/tests/unit/apps/image_measurement/ImageCurvatureMeasurementTest.m similarity index 96% rename from tests/unit/apps/image_measurement/LegacyImageCurvatureMeasurementTest.m rename to tests/unit/apps/image_measurement/ImageCurvatureMeasurementTest.m index 5146f9b..723f43c 100644 --- a/tests/unit/apps/image_measurement/LegacyImageCurvatureMeasurementTest.m +++ b/tests/unit/apps/image_measurement/ImageCurvatureMeasurementTest.m @@ -1,15 +1,15 @@ -classdef LegacyImageCurvatureMeasurementTest < matlab.unittest.TestCase - %LEGACYIMAGECURVATUREMEASUREMENTTEST Official wrapper for migrated legacy coverage. +classdef ImageCurvatureMeasurementTest < matlab.unittest.TestCase + %IMAGECURVATUREMEASUREMENTTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_imageCurvatureMeasurement(testCase) setupLabKitTestPath(); - legacy_test_imageCurvatureMeasurement(); + verify_imageCurvatureMeasurement(); end end end -function legacy_test_imageCurvatureMeasurement() +function verify_imageCurvatureMeasurement() %TEST_IMAGECURVATUREMEASUREMENT Verify image curvature app calculations. checkCircularFitWithMeasuredScale(); diff --git a/tests/unit/labkit/biosignal/LegacyBiosignalDelimitedImportTest.m b/tests/unit/labkit/biosignal/BiosignalDelimitedImportTest.m similarity index 96% rename from tests/unit/labkit/biosignal/LegacyBiosignalDelimitedImportTest.m rename to tests/unit/labkit/biosignal/BiosignalDelimitedImportTest.m index 3abeb9f..e45692c 100644 --- a/tests/unit/labkit/biosignal/LegacyBiosignalDelimitedImportTest.m +++ b/tests/unit/labkit/biosignal/BiosignalDelimitedImportTest.m @@ -1,15 +1,15 @@ -classdef LegacyBiosignalDelimitedImportTest < matlab.unittest.TestCase - %LEGACYBIOSIGNALDELIMITEDIMPORTTEST Official wrapper for migrated legacy coverage. +classdef BiosignalDelimitedImportTest < matlab.unittest.TestCase + %BIOSIGNALDELIMITEDIMPORTTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_biosignalDelimitedImport(testCase) setupLabKitTestPath(); - legacy_test_biosignalDelimitedImport(); + verify_biosignalDelimitedImport(); end end end -function legacy_test_biosignalDelimitedImport() +function verify_biosignalDelimitedImport() %TEST_BIOSIGNALDELIMITEDIMPORT Verify CSV/TXT time inference and repair. csvNoTime = [tempname(tempdir) '.csv']; diff --git a/tests/unit/labkit/biosignal/LegacyBiosignalProcessingTest.m b/tests/unit/labkit/biosignal/BiosignalProcessingTest.m similarity index 90% rename from tests/unit/labkit/biosignal/LegacyBiosignalProcessingTest.m rename to tests/unit/labkit/biosignal/BiosignalProcessingTest.m index 3e02fe7..292346f 100644 --- a/tests/unit/labkit/biosignal/LegacyBiosignalProcessingTest.m +++ b/tests/unit/labkit/biosignal/BiosignalProcessingTest.m @@ -1,15 +1,15 @@ -classdef LegacyBiosignalProcessingTest < matlab.unittest.TestCase - %LEGACYBIOSIGNALPROCESSINGTEST Official wrapper for migrated legacy coverage. +classdef BiosignalProcessingTest < matlab.unittest.TestCase + %BIOSIGNALPROCESSINGTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_biosignalProcessing(testCase) setupLabKitTestPath(); - legacy_test_biosignalProcessing(); + verify_biosignalProcessing(); end end end -function legacy_test_biosignalProcessing() +function verify_biosignalProcessing() %TEST_BIOSIGNALPROCESSING Verify signal filtering and crop/filter composition. signal = syntheticSignal(); diff --git a/tests/unit/labkit/biosignal/LegacyBiosignalRecordingImportTest.m b/tests/unit/labkit/biosignal/BiosignalRecordingImportTest.m similarity index 84% rename from tests/unit/labkit/biosignal/LegacyBiosignalRecordingImportTest.m rename to tests/unit/labkit/biosignal/BiosignalRecordingImportTest.m index b38ca59..d351e5d 100644 --- a/tests/unit/labkit/biosignal/LegacyBiosignalRecordingImportTest.m +++ b/tests/unit/labkit/biosignal/BiosignalRecordingImportTest.m @@ -1,15 +1,15 @@ -classdef LegacyBiosignalRecordingImportTest < matlab.unittest.TestCase - %LEGACYBIOSIGNALRECORDINGIMPORTTEST Official wrapper for migrated legacy coverage. +classdef BiosignalRecordingImportTest < matlab.unittest.TestCase + %BIOSIGNALRECORDINGIMPORTTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_biosignalRecordingImport(testCase) setupLabKitTestPath(); - legacy_test_biosignalRecordingImport(); + verify_biosignalRecordingImport(); end end end -function legacy_test_biosignalRecordingImport() +function verify_biosignalRecordingImport() %TEST_BIOSIGNALRECORDINGIMPORT Verify MAT/timetable import and channel access. tempFile = [tempname(tempdir) '.mat']; diff --git a/tests/unit/labkit/biosignal/LegacyBiosignalSegmentsMeasurementsTest.m b/tests/unit/labkit/biosignal/BiosignalSegmentsMeasurementsTest.m similarity index 88% rename from tests/unit/labkit/biosignal/LegacyBiosignalSegmentsMeasurementsTest.m rename to tests/unit/labkit/biosignal/BiosignalSegmentsMeasurementsTest.m index 554eecd..045e090 100644 --- a/tests/unit/labkit/biosignal/LegacyBiosignalSegmentsMeasurementsTest.m +++ b/tests/unit/labkit/biosignal/BiosignalSegmentsMeasurementsTest.m @@ -1,15 +1,15 @@ -classdef LegacyBiosignalSegmentsMeasurementsTest < matlab.unittest.TestCase - %LEGACYBIOSIGNALSEGMENTSMEASUREMENTSTEST Official wrapper for migrated legacy coverage. +classdef BiosignalSegmentsMeasurementsTest < matlab.unittest.TestCase + %BIOSIGNALSEGMENTSMEASUREMENTSTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_biosignalSegmentsMeasurements(testCase) setupLabKitTestPath(); - legacy_test_biosignalSegmentsMeasurements(); + verify_biosignalSegmentsMeasurements(); end end end -function legacy_test_biosignalSegmentsMeasurements() +function verify_biosignalSegmentsMeasurements() %TEST_BIOSIGNALSEGMENTSMEASUREMENTS Verify segments, templates, measurements, and groups. signal = labkit.biosignal.filterSignal(syntheticSignal(), ... diff --git a/tests/unit/labkit/biosignal/LegacyEcgPeakDetectionTest.m b/tests/unit/labkit/biosignal/EcgPeakDetectionTest.m similarity index 94% rename from tests/unit/labkit/biosignal/LegacyEcgPeakDetectionTest.m rename to tests/unit/labkit/biosignal/EcgPeakDetectionTest.m index 7437cc9..38aad6a 100644 --- a/tests/unit/labkit/biosignal/LegacyEcgPeakDetectionTest.m +++ b/tests/unit/labkit/biosignal/EcgPeakDetectionTest.m @@ -1,15 +1,15 @@ -classdef LegacyEcgPeakDetectionTest < matlab.unittest.TestCase - %LEGACYECGPEAKDETECTIONTEST Official wrapper for migrated legacy coverage. +classdef EcgPeakDetectionTest < matlab.unittest.TestCase + %ECGPEAKDETECTIONTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_ecgPeakDetection(testCase) setupLabKitTestPath(); - legacy_test_ecgPeakDetection(); + verify_ecgPeakDetection(); end end end -function legacy_test_ecgPeakDetection() +function verify_ecgPeakDetection() %TEST_ECGPEAKDETECTION Verify ECG peak detector methods and post-processing. signal = labkit.biosignal.filterSignal(syntheticSignal(), ... diff --git a/tests/unit/labkit/dta/LegacyDetectPulsesTest.m b/tests/unit/labkit/dta/DetectPulsesTest.m similarity index 92% rename from tests/unit/labkit/dta/LegacyDetectPulsesTest.m rename to tests/unit/labkit/dta/DetectPulsesTest.m index 3880a56..23dcea7 100644 --- a/tests/unit/labkit/dta/LegacyDetectPulsesTest.m +++ b/tests/unit/labkit/dta/DetectPulsesTest.m @@ -1,15 +1,15 @@ -classdef LegacyDetectPulsesTest < matlab.unittest.TestCase - %LEGACYDETECTPULSESTEST Official wrapper for migrated legacy coverage. +classdef DetectPulsesTest < matlab.unittest.TestCase + %DETECTPULSESTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_detectPulses(testCase) setupLabKitTestPath(); - legacy_test_detectPulses(); + verify_detectPulses(); end end end -function legacy_test_detectPulses() +function verify_detectPulses() %TEST_DETECTPULSES Verify extracted pulse detection behavior. currentFixture = dtaFixturePath('chrono_chronopot_current_pulse_0p2ms.DTA'); @@ -62,11 +62,11 @@ function legacy_test_detectPulses() assert(pulse.ok, msg); assert(strcmp(pulse.method, 'metadata-current'), 'Default mode should prefer metadata.'); assert(strcmp(msg, 'Metadata pulse detection OK (current-controlled): cath step 1, anod step 3.'), ... - 'Metadata detection message should match legacy wording.'); + 'Metadata detection message should match stable wording.'); assert(abs(pulse.cath_start - 0) < 1e-12 && abs(pulse.cath_end - 0.10) < 1e-12, ... 'Metadata cathodic timing should match TSTEP accumulation.'); assert(abs(pulse.gap_start - 0.10) < 1e-12 && abs(pulse.gap_end - 0.14) < 1e-12, ... - 'Metadata gap timing should match legacy fields.'); + 'Metadata gap timing should match stable fields.'); assert(abs(pulse.gap.center_s - 0.12) < 1e-12, 'Normalized gap center should be populated.'); assert(abs(pulse.cath.current_A + 1e-3) < 1e-15, 'Normalized cathodic current should be populated.'); @@ -95,5 +95,5 @@ function legacy_test_detectPulses() [metadataOnlyPulse, metadataOnlyMsg] = labkit.dta.detectPulses(t, Im, badMeta, "Metadata only"); assert(~metadataOnlyPulse.ok, 'Metadata-only mode should fail without metadata steps.'); assert(strcmp(metadataOnlyMsg, 'Metadata pulse detection: no ISTEP/TSTEP or VSTEP/TSTEP steps found.'), ... - 'Metadata-only failure message should match legacy wording.'); + 'Metadata-only failure message should match stable wording.'); end diff --git a/tests/unit/labkit/dta/LegacyDtaFacadeTest.m b/tests/unit/labkit/dta/DtaFacadeTest.m similarity index 96% rename from tests/unit/labkit/dta/LegacyDtaFacadeTest.m rename to tests/unit/labkit/dta/DtaFacadeTest.m index 28d41a6..8fb79a6 100644 --- a/tests/unit/labkit/dta/LegacyDtaFacadeTest.m +++ b/tests/unit/labkit/dta/DtaFacadeTest.m @@ -1,15 +1,15 @@ -classdef LegacyDtaFacadeTest < matlab.unittest.TestCase - %LEGACYDTAFACADETEST Official wrapper for migrated legacy coverage. +classdef DtaFacadeTest < matlab.unittest.TestCase + %DTAFACADETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_dtaFacade(testCase) setupLabKitTestPath(); - legacy_test_dtaFacade(); + verify_dtaFacade(); end end end -function legacy_test_dtaFacade() +function verify_dtaFacade() %TEST_DTAFACADE Verify GUI-free DTA type detection and loading facade. fixtureDir = dtaFixtureDir(); @@ -38,7 +38,7 @@ function legacy_test_dtaFacade() assert(chronoStatus.kind == "chrono", 'Chrono status kind should be chrono.'); assert(chronoItem.type == "chrono", 'Chrono item type should be preserved.'); assert(isfield(chronoItem, 't') && isfield(chronoItem, 'Vf') && isfield(chronoItem, 'Im'), ... - 'Chrono facade should preserve legacy-compatible vectors.'); + 'Chrono facade should preserve stable-compatible vectors.'); [pulse, pulseMsg] = labkit.dta.detectPulses( ... chronoItem.t, chronoItem.Im, chronoItem.meta, "Metadata first, then auto"); assert(pulse.ok, pulseMsg); @@ -56,7 +56,7 @@ function legacy_test_dtaFacade() assert(eisStatus.kind == "eis", 'Auto-loaded EIS status kind should be eis.'); assert(eisItem.type == "eis", 'EIS item type should be preserved.'); assert(isfield(eisItem, 'Freq') && isfield(eisItem, 'Zreal') && isfield(eisItem, 'Zimag'), ... - 'EIS facade should preserve legacy-compatible impedance vectors.'); + 'EIS facade should preserve stable-compatible impedance vectors.'); [cvctItem, cvctStatus] = labkit.dta.loadFile(cvctFile, "cvct"); assert(cvctStatus.ok, cvctStatus.message); diff --git a/tests/unit/labkit/dta/LegacyDtaSessionFacadeTest.m b/tests/unit/labkit/dta/DtaSessionFacadeTest.m similarity index 93% rename from tests/unit/labkit/dta/LegacyDtaSessionFacadeTest.m rename to tests/unit/labkit/dta/DtaSessionFacadeTest.m index 3df1fb9..5348b67 100644 --- a/tests/unit/labkit/dta/LegacyDtaSessionFacadeTest.m +++ b/tests/unit/labkit/dta/DtaSessionFacadeTest.m @@ -1,15 +1,15 @@ -classdef LegacyDtaSessionFacadeTest < matlab.unittest.TestCase - %LEGACYDTASESSIONFACADETEST Official wrapper for migrated legacy coverage. +classdef DtaSessionFacadeTest < matlab.unittest.TestCase + %DTASESSIONFACADETEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_dtaSessionFacade(testCase) setupLabKitTestPath(); - legacy_test_dtaSessionFacade(); + verify_dtaSessionFacade(); end end end -function legacy_test_dtaSessionFacade() +function verify_dtaSessionFacade() %TEST_DTASESSIONFACADE Verify app-facing DTA session helpers. fixture = dtaFixturePath('chrono_chronopot_current_pulse_0p2ms.DTA'); diff --git a/tests/unit/labkit/dta/LegacyMakeChronoItemTest.m b/tests/unit/labkit/dta/MakeChronoItemTest.m similarity index 82% rename from tests/unit/labkit/dta/LegacyMakeChronoItemTest.m rename to tests/unit/labkit/dta/MakeChronoItemTest.m index e474312..fa61024 100644 --- a/tests/unit/labkit/dta/LegacyMakeChronoItemTest.m +++ b/tests/unit/labkit/dta/MakeChronoItemTest.m @@ -1,15 +1,15 @@ -classdef LegacyMakeChronoItemTest < matlab.unittest.TestCase - %LEGACYMAKECHRONOITEMTEST Official wrapper for migrated legacy coverage. +classdef MakeChronoItemTest < matlab.unittest.TestCase + %MAKECHRONOITEMTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_makeChronoItem(testCase) setupLabKitTestPath(); - legacy_test_makeChronoItem(); + verify_makeChronoItem(); end end end -function legacy_test_makeChronoItem() +function verify_makeChronoItem() %TEST_MAKECHRONOITEM Verify chrono item construction through the DTA facade. fixture = dtaFixturePath('chrono_chronopot_current_pulse_0p2ms.DTA'); @@ -21,12 +21,12 @@ function legacy_test_makeChronoItem() assert(strcmp(item.name, 'chrono_chronopot_current_pulse_0p2ms.DTA'), 'Chrono item name should use the file name.'); assert(item.controlMode == "current", 'Chrono item should expose current-controlled metadata.'); assert(numel(item.t) == 244 && numel(item.Vf) == 244 && numel(item.Im) == 244, ... - 'Legacy-compatible chrono vectors should be populated.'); + 'stable-compatible chrono vectors should be populated.'); assert(isequal(item.t, item.t_s), 'Unit-explicit t_s should mirror legacy t.'); assert(isequal(item.Vf, item.Vf_V), 'Unit-explicit Vf_V should mirror legacy Vf.'); assert(isequal(item.Im, item.Im_A), 'Unit-explicit Im_A should mirror legacy Im.'); assert(item.n == numel(item.t), 'Item sample count should match the time vector.'); - assert(strcmp(item.message, 'Using table: Curve'), 'Main-curve message should preserve legacy wording.'); + assert(strcmp(item.message, 'Using table: Curve'), 'Main-curve message should preserve stable wording.'); assert(item.pulse.ok, item.pulseMessage); assert(isfield(item, 'alignTime_s') && isnan(item.alignTime_s), ... diff --git a/tests/unit/labkit/dta/LegacyParseCVCTDTATest.m b/tests/unit/labkit/dta/ParseCVCTDTATest.m similarity index 93% rename from tests/unit/labkit/dta/LegacyParseCVCTDTATest.m rename to tests/unit/labkit/dta/ParseCVCTDTATest.m index 051735f..23b8b48 100644 --- a/tests/unit/labkit/dta/LegacyParseCVCTDTATest.m +++ b/tests/unit/labkit/dta/ParseCVCTDTATest.m @@ -1,15 +1,15 @@ -classdef LegacyParseCVCTDTATest < matlab.unittest.TestCase - %LEGACYPARSECVCTDTATEST Official wrapper for migrated legacy coverage. +classdef ParseCVCTDTATest < matlab.unittest.TestCase + %PARSECVCTDTATEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_parseCVCTDTA(testCase) setupLabKitTestPath(); - legacy_test_parseCVCTDTA(); + verify_parseCVCTDTA(); end end end -function legacy_test_parseCVCTDTA() +function verify_parseCVCTDTA() %TEST_PARSECVCTDTA Verify extracted CV/CT parser behavior. fixtureFile = dtaFixturePath('cv_cyclic_voltammetry_pt_reference.DTA'); diff --git a/tests/unit/labkit/dta/LegacyParseChronoDTATest.m b/tests/unit/labkit/dta/ParseChronoDTATest.m similarity index 93% rename from tests/unit/labkit/dta/LegacyParseChronoDTATest.m rename to tests/unit/labkit/dta/ParseChronoDTATest.m index e3d5554..4cf7053 100644 --- a/tests/unit/labkit/dta/LegacyParseChronoDTATest.m +++ b/tests/unit/labkit/dta/ParseChronoDTATest.m @@ -1,15 +1,15 @@ -classdef LegacyParseChronoDTATest < matlab.unittest.TestCase - %LEGACYPARSECHRONODTATEST Official wrapper for migrated legacy coverage. +classdef ParseChronoDTATest < matlab.unittest.TestCase + %PARSECHRONODTATEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_parseChronoDTA(testCase) setupLabKitTestPath(); - legacy_test_parseChronoDTA(); + verify_parseChronoDTA(); end end end -function legacy_test_parseChronoDTA() +function verify_parseChronoDTA() %TEST_PARSECHRONODTA Verify extracted chrono DTA parser and accessors. filepaths = labkit.dta.findFiles(dtaFixtureDir()); @@ -42,7 +42,7 @@ function legacy_test_parseChronoDTA() [curve, ok, msg] = labkit.dta.getMainCurve(tables); assert(ok, msg); - assert(strcmp(msg, 'Using table: Curve'), 'Main curve message should match legacy wording.'); + assert(strcmp(msg, 'Using table: Curve'), 'Main curve message should match stable wording.'); t = labkit.dta.getColumn(curve, 'T'); vf = labkit.dta.getColumn(curve, 'Vf'); diff --git a/tests/unit/labkit/dta/LegacyParseEISDTATest.m b/tests/unit/labkit/dta/ParseEISDTATest.m similarity index 87% rename from tests/unit/labkit/dta/LegacyParseEISDTATest.m rename to tests/unit/labkit/dta/ParseEISDTATest.m index 745682f..3f8df9f 100644 --- a/tests/unit/labkit/dta/LegacyParseEISDTATest.m +++ b/tests/unit/labkit/dta/ParseEISDTATest.m @@ -1,15 +1,15 @@ -classdef LegacyParseEISDTATest < matlab.unittest.TestCase - %LEGACYPARSEEISDTATEST Official wrapper for migrated legacy coverage. +classdef ParseEISDTATest < matlab.unittest.TestCase + %PARSEEISDTATEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_parseEISDTA(testCase) setupLabKitTestPath(); - legacy_test_parseEISDTA(); + verify_parseEISDTA(); end end end -function legacy_test_parseEISDTA() +function verify_parseEISDTA() %TEST_PARSEEISDTA Verify extracted EIS parser and ZCURVE accessors. fixture = dtaFixturePath('eis_potentiostatic_zcurve.DTA'); @@ -20,7 +20,7 @@ function legacy_test_parseEISDTA() tables = item.tables; logmsg = item.logmsg; - assert(strcmp(meta.tag, ''), 'Two-token TAG metadata should preserve legacy empty-tag behavior.'); + assert(strcmp(meta.tag, ''), 'Two-token TAG metadata should preserve stable empty-tag behavior.'); assert(strcmp(meta.title, 'Potentiostatic EIS'), 'TITLE metadata should be parsed from EIS fixture.'); assert(abs(meta.area_cm2 - 1.76) < 1e-12, 'AREA metadata should be parsed from EIS fixture.'); assert(any(strcmp({tables.name}, 'ZCURVE')), 'ZCURVE table should be parsed.'); @@ -28,7 +28,7 @@ function legacy_test_parseEISDTA() [curve, ok, msg] = labkit.dta.getZCurve(tables); assert(ok, msg); - assert(strcmp(msg, 'Using table: ZCURVE'), 'ZCURVE message should match legacy wording.'); + assert(strcmp(msg, 'Using table: ZCURVE'), 'ZCURVE message should match stable wording.'); freq = labkit.dta.getColumn(curve, 'Freq'); zreal = labkit.dta.getColumn(curve, 'Zreal'); diff --git a/tests/unit/labkit/dta/LegacySessionUtilitiesTest.m b/tests/unit/labkit/dta/SessionUtilitiesTest.m similarity index 89% rename from tests/unit/labkit/dta/LegacySessionUtilitiesTest.m rename to tests/unit/labkit/dta/SessionUtilitiesTest.m index 4cffc03..40b9495 100644 --- a/tests/unit/labkit/dta/LegacySessionUtilitiesTest.m +++ b/tests/unit/labkit/dta/SessionUtilitiesTest.m @@ -1,15 +1,15 @@ -classdef LegacySessionUtilitiesTest < matlab.unittest.TestCase - %LEGACYSESSIONUTILITIESTEST Official wrapper for migrated legacy coverage. +classdef SessionUtilitiesTest < matlab.unittest.TestCase + %SESSIONUTILITIESTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_sessionUtilities(testCase) setupLabKitTestPath(); - legacy_test_sessionUtilities(); + verify_sessionUtilities(); end end end -function legacy_test_sessionUtilities() +function verify_sessionUtilities() %TEST_SESSIONUTILITIES Verify session save/load helpers. session = labkit.dta.makeSession('eis', struct('notes', 'demo notes')); diff --git a/tests/unit/labkit/ui/LegacyAppHookHelpersTest.m b/tests/unit/labkit/ui/AppHookHelpersTest.m similarity index 96% rename from tests/unit/labkit/ui/LegacyAppHookHelpersTest.m rename to tests/unit/labkit/ui/AppHookHelpersTest.m index 20b82fb..47ef00e 100644 --- a/tests/unit/labkit/ui/LegacyAppHookHelpersTest.m +++ b/tests/unit/labkit/ui/AppHookHelpersTest.m @@ -1,15 +1,15 @@ -classdef LegacyAppHookHelpersTest < matlab.unittest.TestCase - %LEGACYAPPHOOKHELPERSTEST Official wrapper for migrated legacy coverage. +classdef AppHookHelpersTest < matlab.unittest.TestCase + %APPHOOKHELPERSTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_appHookHelpers(testCase) setupLabKitTestPath(); - legacy_test_appHookHelpers(); + verify_appHookHelpers(); end end end -function legacy_test_appHookHelpers() +function verify_appHookHelpers() %TEST_APPHOOKHELPERS Verify internal app hook dispatch and debug log helpers. checkDebugLog(); diff --git a/tests/unit/labkit/ui/LegacyPlotXYTest.m b/tests/unit/labkit/ui/PlotXYTest.m similarity index 89% rename from tests/unit/labkit/ui/LegacyPlotXYTest.m rename to tests/unit/labkit/ui/PlotXYTest.m index e7337b8..741e718 100644 --- a/tests/unit/labkit/ui/LegacyPlotXYTest.m +++ b/tests/unit/labkit/ui/PlotXYTest.m @@ -1,15 +1,15 @@ -classdef LegacyPlotXYTest < matlab.unittest.TestCase - %LEGACYPLOTXYTEST Official wrapper for migrated legacy coverage. +classdef PlotXYTest < matlab.unittest.TestCase + %PLOTXYTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_plotXY(testCase) setupLabKitTestPath(); - legacy_test_plotXY(); + verify_plotXY(); end end end -function legacy_test_plotXY() +function verify_plotXY() %TEST_PLOTXY Verify prepared X/Y plotting helper behavior. curve = struct(); @@ -25,7 +25,7 @@ function legacy_test_plotXY() assert(strcmp(xname, 'T') && strcmp(yname, 'Vf'), 'getCurveXY should return selected header names.'); [badX, badY] = labkit.dta.getCurveXY(curve, 't', 'Vf'); - assert(isempty(badX) && isempty(badY), 'getCurveXY should preserve legacy exact-case column selection.'); + assert(isempty(badX) && isempty(badY), 'getCurveXY should preserve stable exact-case column selection.'); fig = figure('Visible', 'off'); cleaner = onCleanup(@() closeIfValid(fig)); @@ -41,7 +41,7 @@ function legacy_test_plotXY() lines = findobj(ax, 'Type', 'line'); assert(numel(lines) == 1, 'plotXY should add one data line.'); - assert(abs(lines(1).LineWidth - 1.2) < 1e-12, 'Line width should match legacy default.'); + assert(abs(lines(1).LineWidth - 1.2) < 1e-12, 'Line width should match stable default.'); assert(strcmp(ax.Title.String, 'CURVE1'), 'Plot title should use curve name.'); assert(strcmp(ax.XLabel.String, 'T'), 'X label should use selected header.'); assert(strcmp(ax.YLabel.String, 'Vf'), 'Y label should use selected header.'); diff --git a/tests/unit/labkit/ui/LegacyScaleBarCalibrationTest.m b/tests/unit/labkit/ui/ScaleBarCalibrationTest.m similarity index 87% rename from tests/unit/labkit/ui/LegacyScaleBarCalibrationTest.m rename to tests/unit/labkit/ui/ScaleBarCalibrationTest.m index e8d4ae2..b75507e 100644 --- a/tests/unit/labkit/ui/LegacyScaleBarCalibrationTest.m +++ b/tests/unit/labkit/ui/ScaleBarCalibrationTest.m @@ -1,15 +1,15 @@ -classdef LegacyScaleBarCalibrationTest < matlab.unittest.TestCase - %LEGACYSCALEBARCALIBRATIONTEST Official wrapper for migrated legacy coverage. +classdef ScaleBarCalibrationTest < matlab.unittest.TestCase + %SCALEBARCALIBRATIONTEST Verify LabKit behavior through official MATLAB tests. methods (Test, TestTags = {'Unit'}) function test_scaleBarCalibration(testCase) setupLabKitTestPath(); - legacy_test_scaleBarCalibration(); + verify_scaleBarCalibration(); end end end -function legacy_test_scaleBarCalibration() +function verify_scaleBarCalibration() %TEST_SCALEBARCALIBRATION Verify reusable scale-bar calibration model. checkTypedCalibration();