From c6b902d346ff5c1d11385346ac6183c08f4404f4 Mon Sep 17 00:00:00 2001 From: Silas Oettinghaus Date: Wed, 25 Mar 2026 09:48:43 +0100 Subject: [PATCH] final touch on test_dashboard --- Tests/test_dashboard.m | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Tests/test_dashboard.m b/Tests/test_dashboard.m index 537896b..89b5cf5 100644 --- a/Tests/test_dashboard.m +++ b/Tests/test_dashboard.m @@ -65,7 +65,7 @@ function app = test_dashboard(options) app.TotalLabel = makeMetricLabel(headerGrid, "Total", 7); app.FilterDropDown = uidropdown(headerGrid, ... - "Items", {'All', 'Implemented', 'Placeholder', 'Missing', 'Standalone'}, ... + "Items", {'All', 'Implemented', 'Missing', 'Standalone'}, ... "Value", 'All', ... "ValueChangedFcn", @filterChanged); app.FilterDropDown.Layout.Row = 2; @@ -176,8 +176,6 @@ function app = test_dashboard(options) switch string(app.FilterDropDown.Value) case "Implemented" filtered = filtered(filtered.Status == "Implemented", :); - case "Placeholder" - filtered = filtered(filtered.Status == "Placeholder", :); case "Missing" filtered = filtered(filtered.Status == "Missing", :); case "Standalone" @@ -192,7 +190,6 @@ function app = test_dashboard(options) function updateSummary(inventory) implementedCount = nnz(inventory.Status == "Implemented"); - placeholderCount = nnz(inventory.Status == "Placeholder"); missingCount = nnz(inventory.Status == "Missing"); passedCount = nnz(inventory.LastRun == "Passed"); failedCount = nnz(inventory.LastRun == "Failed"); @@ -200,7 +197,7 @@ function app = test_dashboard(options) totalCount = height(inventory); app.ImplementedLabel.Text = sprintf("Implemented: %d", implementedCount); - app.PlaceholderLabel.Text = sprintf("Placeholder: %d", placeholderCount); + app.PlaceholderLabel.Text = "Placeholder: hidden"; app.MissingLabel.Text = sprintf("Missing: %d", missingCount); app.PassedLabel.Text = sprintf("Passed: %d", passedCount); app.FailedLabel.Text = sprintf("Failed: %d", failedCount); @@ -661,15 +658,15 @@ function inventory = buildInventory(repoRoot, testsRoot) tags = ""; testFileName = ""; else - matchedTestFiles(end + 1, 1) = testFile; %#ok source = fileread(testFile); if contains(source, "assumeFail(") - status = "Placeholder"; + continue else + matchedTestFiles(end + 1, 1) = testFile; %#ok status = "Implemented"; + tags = strjoin(extractTestTags(source), ", "); + [~, testFileName] = fileparts(testFile); end - tags = strjoin(extractTestTags(source), ", "); - [~, testFileName] = fileparts(testFile); end targetLabel = fullfile('Classes', relativeDirText, [classNameText, '.m']); @@ -698,7 +695,7 @@ function inventory = buildInventory(repoRoot, testsRoot) source = fileread(testFile); if contains(source, "assumeFail(") - status = "Placeholder"; + continue else status = "Implemented"; end @@ -733,6 +730,8 @@ function inventory = buildInventory(repoRoot, testsRoot) return end + inventory = inventory(inventory.Status ~= "Placeholder", :); + statusOrder = containers.Map( ... {'Implemented', 'Missing', 'Placeholder'}, ... {1, 2, 3});